storage: Reload systemd before mounting after formatting
storage: Reload systemd before mounting after formatting

Otherwise systemd might have outdated UUID / mount point mappings and
might unmount our new filesystem right away again.

Here are the details.  Start with this in /etc/fstab:

    UUID=<uuid1> /run/foo ...

This causes systemd to associate uuid1 with /run/foo.  Now uuid1 is
unmounted, the block device is formatted, and a new fstab is written
with the new uuid2 but with the same mount point:

    UUID=<uuid2> /run/foo ...

At this point, systemd sees that uuid1 has disappeared and will make
sure that /run/foo is not mounted, because it still associates
/run/foo with uuid1.  At the same time, Cockpit will mount the new
filesystem at /run/foo.  This is a race and sometimes Cockpit does the
mount, and then systemd does its cleanup and unmounts.  (If systemd
does the cleanup first, it will find /run/foo already unmounted and
not do anything.)

The race is avoided by reloading systemd before having Cockpit do the
mount.  This way, systemd will forget the uuid1 -> /run/foo
association.

mvollmer/cockpit,cockpit-project/cockpit,martinpitt/cockpit,mvollmer/cockpit,garrett/cockpit,martinpitt/cockpit,cockpit-project/cockpit,garrett/cockpit,cockpit-project/cockpit,mvollmer/cockpit,garrett/cockpit,cockpit-project/cockpit,mvollmer/cockpit,martinpitt/cockpit,garrett/cockpit,martinpitt/cockpit,garrett/cockpit,mvollmer/cockpit,cockpit-project/cockpit,martinpitt/cockpit