Nextcloud interface-update sequence problem

I raised another issue about signal-event interface-update hanging and then causing my system to fail to reconfigure, and then basically become unavailable.

After digging through, I found out why: My Nextcloud has a data directory that is on a network drive.

Here we can see the sequence of interface-update

  • S03nethserver-alerts-reset-wan
  • S04network-stop
  • S20interface-rename
  • S21adjust-fixnetwork-flag
  • S25interface-config-reset
  • S30interface-config-write
  • S50nethserver-nextcloud-occ-conf
  • S60nethserver-dnsmasq-adjustdb
  • S61nethserver-dnsmasq-signalsave
  • S70network-start
  • S80static-routes-save
  • S90firewall-adjust
  • S95trusted-networks-modify
  • S99nethserver-docker-interface-update-restart-docker

The Nextcloud configuration happens while the network is down, and even the simple occ commands for adjusting Nextcloud configuration will fail while the data directory is unavailable.

I found that changing S50nethserver-nextcloud-occ-conf to S91nethserver-nextcloud-occ-conf makes everything work just fine.

Is it possible to get this updated in the default install? Also, could the script be improved so that if it crashes it won’t stop the rest of the configuration steps from proceeding?

3 Likes

Made a PR for this, in case anyone wants to review and approve :slight_smile: https://github.com/NethServer/nethserver-nextcloud/pull/86

4 Likes

this is not only for you, testing with a brand new VM I have also the error with the event interface-update

Aug 11 18:07:14 ns7dev12 esmith::event[9913]: System config value trusted_domains => 3 set to string ns7dev12
Aug 11 18:07:14 ns7dev12 esmith::event[9913]: (Invalid argument): IO::Socket::INET: Bad hostname 'nsdc-ns7dev12.ad.nethservertest.org'
Aug 11 18:07:14 ns7dev12 esmith::event[9913]: Action: /etc/e-smith/events/interface-update/S50nethserver-nextcloud-occ-conf FAILED: 1 [6.080312]

Moving the action to S91 will fix the issue because the action is triggered once the NICs are started.

cc @dev_team

2 Likes