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

deploy: Fix removing /var/.updated with separate /var mount #1730

Closed

Conversation

cgwalters
Copy link
Member

There's some subtlety to this, we don't handle all cases.
But the 99% cases are using --sysroot deploy to create an
initial deployment, and then doing upgrades from inside
a booted deployment.

It was only the latter case that didn't work with a separate /var.
Fixing all of them would probably require libostree to learn
how to e.g. look at /etc/fstab (or worse, systemd mount units?)
and handle the mounting. I don't think we want to do anything
like that right now, since there are no active drivers for the
use case.

Closes: #1729

There's some subtlety to this, we don't handle all cases.
But the 99% cases are using `--sysroot deploy` to create an
initial deployment, and then doing upgrades from inside
a booted deployment.

It was only the latter case that didn't work with a separate `/var`.
Fixing all of them would probably require libostree to learn
how to e.g. look at `/etc/fstab` (or worse, systemd mount units?)
and handle the mounting.  I don't think we want to do anything
like that right now, since there are no active drivers for the
use case.

Closes: ostreedev#1729
@cgwalters
Copy link
Member Author

Just compile/unit tested, but sadly our test suite today doesn't actively exercise split /var.

@akiernan
Copy link
Contributor

LGTM

root@hvt-341:~# ls -l /var/.updated
-rw-r--r-- 1 root root 190 Jan  1  1970 /var/.updated
root@hvt-341:~# ostree admin deploy master/nano/nano2/nano-image-osa
Copying /etc changes: 4 modified, 0 removed, 15 added
[  164.911751] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
warning: Failed to remount /boot read-only: Device or resource busy
Transaction complete; bootconfig swap: yes; deployment count change: 0
Freed objects: 600.9 kB
root@hvt-341:~# ls -l /var/.updated
ls: cannot access '/var/.updated': No such file or directory

@cgwalters
Copy link
Member Author

@rh-atomic-bot delegate=akiernan

@rh-atomic-bot
Copy link

✌️ @akiernan can now approve this pull request

akiernan pushed a commit to akiernan/meta-ostree-core that referenced this pull request Sep 21, 2018
akiernan added a commit to akiernan/meta-ostree-core that referenced this pull request Sep 21, 2018
From upstream:

ostreedev/ostree#1730
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
@akiernan
Copy link
Contributor

@rh-atomic-bot r+ f787f66

@rh-atomic-bot
Copy link

⌛ Testing commit f787f66 with merge 44d5f1c...

@rh-atomic-bot
Copy link

☀️ Test successful - status-atomicjenkins
Approved by: akiernan
Pushing 44d5f1c to master...

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

Successfully merging this pull request may close these issues.

None yet

3 participants