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

Separate /var broke in 2018.6 #1667

Closed
cgwalters opened this issue Jul 3, 2018 · 10 comments
Closed

Separate /var broke in 2018.6 #1667

cgwalters opened this issue Jul 3, 2018 · 10 comments

Comments

@cgwalters
Copy link
Member

Regression from #1617

We need an insttest covering this.

jlebon added a commit to jlebon/ostree that referenced this issue Jul 3, 2018
I made a logical error in ostreedev#1617 which resulted in the exact *opposite*
behaviour we want when `/var` is a separate mount.

Split this out and lower the number of negations to make it more obvious
that it's correct.

Closes: ostreedev#1667
jlebon added a commit to jlebon/ostree that referenced this issue Jul 3, 2018
I made a logical error in ostreedev#1617 which resulted in the exact *opposite*
behaviour we want when `/var` is a separate mount.

Split this out and lower the number of negations to make it more obvious
that it's correct.

Closes: ostreedev#1667
@cgwalters
Copy link
Member Author

cgwalters commented Jul 3, 2018

Trivial reproducer setup for a separate /var in a testing VM:

cp -a /var /sysroot/myvar
touch /sysroot/myvar/somenewfile
echo '/sysroot/myvar /var none bind 0 0' >> /etc/fstab

(And if you do e.g. rpm-ostree override replace to test, don't forget to rpm-ostree initramfs --enable like I did)

@cgwalters
Copy link
Member Author

Dropping this systemd unit in /etc/systemd/system should work around the issue:

$ cat > /etc/systemd/system/workaround-ostree-issue-1667.service << EOF
[Unit]
DefaultDependencies=no
Before=ostree-remount.service

[Service]
ExecStart=/bin/sh -c 'if findmnt -s -n -T /var; then echo Enabling workaround; umount /var; systemctl start --no-block var.mount; fi'

[Install]
WantedBy=multi-user.target
EOF
$ systemctl enable workaround-ostree-issue-1667.service

@ghost
Copy link

ghost commented Jul 4, 2018

@cgwalters, thank you. Will try it in the evening, then I come back home.

@akiernan
Copy link
Contributor

akiernan commented Jul 4, 2018

That workaround is fixing the separate /var problem for me. The change in #1668 isn't doing it for me though, but given I'm newly trying to use a separate /var I'm not sure I'm seeing the original problem.

@jlebon
Copy link
Member

jlebon commented Jul 4, 2018

@akiernan When testing #1668, make sure to also rpm-ostree initramfs --enable since the fix happens in the initramfs.

@jlebon
Copy link
Member

jlebon commented Jul 4, 2018

@akiernan
Copy link
Contributor

akiernan commented Jul 4, 2018

@jlebon Thanks - it wasn't that, but I think I've found my problem, just testing it and I'll open a new ticket for it.

@ghost
Copy link

ghost commented Jul 4, 2018

Workaround isn't worked for me. Because of /var/home mount, I think.

$ systemctl status workaround-ostree-issue-1667.service
● workaround-ostree-issue-1667.service
   Loaded: loaded (/etc/systemd/system/workaround-ostree-issue-1667.service; enabled; vendor preset: disabled)
   Active: inactive (dead) since Wed 2018-07-04 22:09:05 MSK; 3min 14s ago
  Process: 582 ExecStart=/bin/sh -c if findmnt -s -n -T "/var"; then echo "Enabling workaround"; umount /var; systemctl start --no-block var.mount; fi (code=exited, status=0/SUCCESS)
 Main PID: 582 (code=exited, status=0/SUCCESS)

июл 04 22:09:05 E101-Y52015IKBA sh[582]: /var   /dev/mapper/faw_y52015ikba-var ext4   defaults,discard
июл 04 22:09:05 E101-Y52015IKBA sh[582]: Enabling workaround
июл 04 22:09:05 E101-Y52015IKBA sh[582]: umount: /var: target is busy.

@jlebon
Copy link
Member

jlebon commented Jul 4, 2018

We chatted on IRC, though for posterity:
You can download the RPMs from that Bodhi update and do:

$ rpm-ostree override replace ostree{,-grub2,-libs}-2018.6-4.fc28.x86_64
$ rpm-ostree initramfs --enable

@ghost
Copy link

ghost commented Jul 4, 2018

Yes. Overriding packages fixing the issue completely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants