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

Read-only /sysroot prevents pulling down new commits via ostree CLI #343

Closed
jlebon opened this issue Jan 10, 2020 · 9 comments
Closed

Read-only /sysroot prevents pulling down new commits via ostree CLI #343

jlebon opened this issue Jan 10, 2020 · 9 comments

Comments

@jlebon
Copy link
Member

jlebon commented Jan 10, 2020

A local build with git master rpm-ostree and git master ostree (which has ostreedev/ostree#1767) errors on:

[root@coreos ~]# ostree pull --commit-metadata-only fedora:fedora/x86_64/coreos/stable
error: Cannot write to repository: Read-only file system

Seems like we need to remount rw in the pull paths too. Hmm, or maybe it's something that ostree and rpm-ostreed should just do upfront instead of only in specific paths?

Note the testing release 31.20191217.2.0 already has sysroot.readonly=true (coreos/coreos-assembler#736). So we'll want to fix this before the ostree code drops (because otherwise, nodes won't be able to update).

@jlebon
Copy link
Member Author

jlebon commented Jan 10, 2020

Ahh actually, rpm-ostree rebase does work, so this shouldn't break auto-updates. So I think this is just scoped to the ostree CLI then.

@jlebon jlebon changed the title Read-only sysroot covers OSTree repo, prevents pulling down new commits Read-only /sysroot prevents pulling down new commits via ostree CLI Jan 10, 2020
@cgwalters
Copy link
Member

We probably should change ostree pull to do that indeed. (This is a bit unfortunate as it layer-crosses the otherwise clean separation between sysroot and repo, but eh)

But we're just using the regular rpm-ostree upgrade path which remounts the sysroot before it does much else. IOW, this only breaks people who manually invoke ostree pull right?

@jlebon
Copy link
Member Author

jlebon commented Jan 10, 2020

IOW, this only breaks people who manually invoke ostree pull right?

Yes, that's my conclusion as well. Much less worrying!
We can move this issue to the ostree repo if you prefer.

There's another use case, which is ostree checkout to somewhere under /ostree/repo to make sure one gets hardlinks (which is actually how I hit this first).

jlebon added a commit to jlebon/fedora-coreos-config that referenced this issue Mar 12, 2020
We need some more fixes to the readonly path before we can bump to
2020.2:

coreos/fedora-coreos-tracker#343
jlebon added a commit to jlebon/fedora-coreos-config that referenced this issue Mar 12, 2020
We need some more fixes to the readonly path before we can bump to
2020.2:

coreos/fedora-coreos-tracker#343
@jlebon
Copy link
Member Author

jlebon commented Mar 12, 2020

Now that 2020.2 has hit the stable repos, it's entered FCOS bodhi-updates, and kola is reporting more issues there:

--- FAIL: rpmostree.upgrade-rollback (25.76s)
    --- FAIL: rpmostree.upgrade-rollback/upgrade (0.17s)
            cluster.go:122: error: open(O_TMPFILE): Read-only file system
            cluster.go:143: "sudo ostree refs --create local-branch 62eabc11696c3744b9301db0e3a3235d5f0a0c54b73767a0046bd0ad1eb6f334" failed: output , status Process exited with status 1
    --- SKIP: rpmostree.upgrade-rollback/rollback (0.00s)
            cluster.go:50: A previous test has already failed
--- FAIL: ostree.remote (29.57s)
    --- PASS: ostree.remote/add (0.13s)
    --- PASS: ostree.remote/list (0.11s)
    --- PASS: ostree.remote/show-url (0.10s)
    --- PASS: ostree.remote/refs (1.09s)
    --- PASS: ostree.remote/summary (2.05s)
    --- FAIL: ostree.remote/delete (0.29s)
            cluster.go:122: error: unlink(custom.trustedkeys.gpg): Read-only file system
            cluster.go:143: "sudo ostree remote delete custom" failed: output , status Process exited with status 1
--- FAIL: rpmostree.install-uninstall (26.64s)
    --- FAIL: rpmostree.install-uninstall/install (0.53s)
            cluster.go:122: error: Read-only file system
            cluster.go:143: "sudo rpm-ostree install bird" failed: output , status Process exited with status 1
    --- FAIL: rpmostree.install-uninstall/uninstall (0.48s)
            cluster.go:122: error: Read-only file system
            cluster.go:143: "sudo rpm-ostree uninstall bird" failed: output , status Process exited with status 1

Let's look into those, though for now let's unblock lockfile bumps: coreos/fedora-coreos-config#300

jlebon added a commit to coreos/fedora-coreos-config that referenced this issue Mar 12, 2020
We need some more fixes to the readonly path before we can bump to
2020.2:

coreos/fedora-coreos-tracker#343
cgwalters added a commit to cgwalters/coreos-assembler that referenced this issue Mar 12, 2020
See
coreos/fedora-coreos-tracker#343 (comment)
Basically we need to make raw `ostree` operations work and not
just `ostree admin`.
cgwalters added a commit to cgwalters/coreos-assembler that referenced this issue Mar 12, 2020
See
coreos/fedora-coreos-tracker#343 (comment)
Basically we need to make raw `ostree` operations work and not
just `ostree admin`.
cgwalters added a commit to cgwalters/ostree that referenced this issue Mar 12, 2020
See coreos/fedora-coreos-tracker#343
When we added the read-only sysroot support it broke using "raw"
`ostree pull` and `ostree refs --create` and all of the core repo
CLIs that just operate on a repo and not a sysroot.

Fixing this is a bit ugly as it "layer crosses" things even more.
Extract a helper function that works in both cases.
@cgwalters
Copy link
Member

Yeah, working on this in ostreedev/ostree#2027 it's just ugly.

cgwalters added a commit to cgwalters/ostree that referenced this issue Mar 13, 2020
See coreos/fedora-coreos-tracker#343
When we added the read-only sysroot support it broke using "raw"
`ostree pull` and `ostree refs --create` and all of the core repo
CLIs that just operate on a repo and not a sysroot.

Fixing this is a bit ugly as it "layer crosses" things even more.
Extract a helper function that works in both cases.
@cgwalters
Copy link
Member

PR in ostreedev/ostree#2027 is tested and working.

cgwalters added a commit to cgwalters/ostree that referenced this issue Mar 13, 2020
See coreos/fedora-coreos-tracker#343
When we added the read-only sysroot support it broke using "raw"
`ostree pull` and `ostree refs --create` and all of the core repo
CLIs that just operate on a repo and not a sysroot.

Fixing this is a bit ugly as it "layer crosses" things even more.
Extract a helper function that works in both cases.
jlebon added a commit to jlebon/fedora-coreos-config that referenced this issue Mar 16, 2020
Issues with read-only sysroot should be fixed now!
coreos/fedora-coreos-tracker#343
@jlebon
Copy link
Member Author

jlebon commented Mar 16, 2020

coreos/fedora-coreos-config#302
coreos/fedora-coreos-config#303

I think we can close this issue after those are merged!

cgwalters pushed a commit to coreos/fedora-coreos-config that referenced this issue Mar 16, 2020
Issues with read-only sysroot should be fixed now!
coreos/fedora-coreos-tracker#343
@dustymabe
Copy link
Member

merged... should we close?

@jlebon
Copy link
Member Author

jlebon commented Mar 18, 2020

Yup, let's close this!

(There's still some work ongoing in coreos/rpm-ostree#2023 to adapt the rpm-ostree testsuite, but that's clearly not an FCOS problem.)

@jlebon jlebon closed this as completed Mar 18, 2020
cgwalters added a commit to cgwalters/coreos-assembler that referenced this issue May 18, 2020
See
coreos/fedora-coreos-tracker#343 (comment)
Basically we need to make raw `ostree` operations work and not
just `ostree admin`.

Pairs with coreos/fedora-coreos-config#304
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