Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSTree finalization on shutdown errors out #215

Closed
jlebon opened this issue Jul 16, 2019 · 3 comments · Fixed by coreos/fedora-coreos-config#119
Closed

OSTree finalization on shutdown errors out #215

jlebon opened this issue Jul 16, 2019 · 3 comments · Fixed by coreos/fedora-coreos-config#119
Labels

Comments

@jlebon
Copy link
Member

jlebon commented Jul 16, 2019

The latest FCOS preview release (30.20190716.0) seems to have an issue with OSTree finalization on shutdown:

Jul 16 18:19:02 localhost ostree[1914]: error: Unexpected state: /run/ostree-booted found and in / sysroot but not in a booted deployment
Jul 16 18:19:02 localhost systemd[1]: ostree-finalize-staged.service: Control process exited, code=exited, status=1/FAILURE
Jul 16 18:19:02 localhost systemd[1]: ostree-finalize-staged.service: Failed with result 'exit-code'.
Jul 16 18:19:02 localhost systemd[1]: Stopped OSTree Finalize Staged Deployment.

Still investigating this, but offhand it seems like /boot is being unmounted before ostree-finalize-staged.service "shuts down", which doesn't make sense since we have After=local-fs.target.

The workaround is manually calling ostree admin finalize-staged before restarting.

@jlebon
Copy link
Member Author

jlebon commented Jul 16, 2019

Probably related: coreos/fedora-coreos-config#105

@ajeddeloh
Copy link
Contributor

What does the boot unit look like on a anaconda'd ostree setup? Maybe there's some other deps?

jlebon added a commit to jlebon/fedora-coreos-config that referenced this issue Jul 17, 2019
Otherwise, `systemd-gpt-auto-generator`'s generated `boot.automount`
will cause a funky mount structure:

```
├─/boot           systemd-1    autofs
│ └─/boot         /dev/vda1    ext4
│   └─/boot/efi   /dev/vda2    vfat
```

which then causes issues for us, especially around shutdown ordering.
See also the linked systemd issue.

I initially added `systemd.no_gpt=0` to the kargs in `image.yaml`,
because it's better to just *not* have generated mount units in the
first place. But I'm hesitant to resort to kargs yet, since it's
something we don't control as easily as a unit file. (And hopefully it's
something that we'll be able to drop in the future).

Closes: coreos/fedora-coreos-tracker#215
jlebon added a commit to jlebon/fedora-coreos-config that referenced this issue Jul 17, 2019
Otherwise, `systemd-gpt-auto-generator`'s generated `boot.automount`
will cause a funky mount structure:

```
├─/boot           systemd-1    autofs
│ └─/boot         /dev/vda1    ext4
│   └─/boot/efi   /dev/vda2    vfat
```

which then causes issues for us, especially around shutdown ordering.
See also the linked systemd issue.

I initially added `systemd.no_gpt=0` to the kargs in `image.yaml`,
because it's better to just *not* have generated mount units in the
first place. But I'm hesitant to resort to kargs yet, since it's
something we don't control as easily as a unit file. (And ideally, it's
only a temporary measure).

Closes: coreos/fedora-coreos-tracker#215
jlebon added a commit to jlebon/fedora-coreos-config that referenced this issue Jul 17, 2019
Otherwise, `systemd-gpt-auto-generator`'s generated `boot.automount`
will cause a funky mount structure:

```
├─/boot           systemd-1    autofs
│ └─/boot         /dev/vda1    ext4
│   └─/boot/efi   /dev/vda2    vfat
```

The nature of `autofs` then causes issues for us around shutdown
ordering. See also the linked systemd issue.

Really, we don't need the GPT generator at all for now, so just nuke it
from the tree.

Closes: coreos/fedora-coreos-tracker#215
@jlebon
Copy link
Member Author

jlebon commented Jul 17, 2019

jlebon added a commit to coreos/fedora-coreos-config that referenced this issue Jul 17, 2019
Otherwise, `systemd-gpt-auto-generator`'s generated `boot.automount`
will cause a funky mount structure:

```
├─/boot           systemd-1    autofs
│ └─/boot         /dev/vda1    ext4
│   └─/boot/efi   /dev/vda2    vfat
```

The nature of `autofs` then causes issues for us around shutdown
ordering. See also the linked systemd issue.

Really, we don't need the GPT generator at all for now, so just nuke it
from the tree.

Closes: coreos/fedora-coreos-tracker#215
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants