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

bots: Adjust for Fedora Atomic now being version 28 #9090

Merged
merged 5 commits into from
May 14, 2018

Conversation

martinpitt
Copy link
Member

@martinpitt martinpitt commented May 2, 2018

@martinpitt martinpitt added the bot label May 2, 2018
@cockpituous cockpituous changed the title bots: Adjust for Fedora Atomic now being version 28 WIP: cockpit-tasks-mrr3b: bots: Adjust for Fedora Atomic now being version 28 May 2, 2018
@cockpituous cockpituous changed the title WIP: cockpit-tasks-mrr3b: bots: Adjust for Fedora Atomic now being version 28 bots: Adjust for Fedora Atomic now being version 28 May 2, 2018
martinpitt added a commit to martinpitt/cockpit that referenced this pull request May 2, 2018
The download path changed, there is no CloudImages/ subdir any more.
The qcow images moved to AtomicHost/ instead.

Closes cockpit-project#9090
@cockpit-project cockpit-project deleted a comment from cockpituous May 2, 2018
@cockpit-project cockpit-project deleted a comment from cockpituous May 2, 2018
@cockpituous cockpituous changed the title bots: Adjust for Fedora Atomic now being version 28 WIP: cockpit-tasks-mrr3b: bots: Adjust for Fedora Atomic now being version 28 May 2, 2018
@cockpituous
Copy link
Contributor

image-refresh in progress on cockpit-tasks-mrr3b.
Log: http://fedorapeople.org/groups/cockpit/logs/image-refresh-9090-20180502-151717/

@cockpituous
Copy link
Contributor

@cockpituous cockpituous changed the title WIP: cockpit-tasks-mrr3b: bots: Adjust for Fedora Atomic now being version 28 bots: Adjust for Fedora Atomic now being version 28 May 2, 2018
@martinpitt
Copy link
Member Author

Image build fails with

Trying to pull repository registry.fedoraproject.org/f28/cockpit ... 
manifest for registry.fedoraproject.org/f28/cockpit:latest not found

Indeed there is no f28 container on https://registry.fedoraproject.org/, and https://src.fedoraproject.org/container/cockpit/branch/f28 looks outdated. The f27 branch got updated regularly. Needs investigation and supplying this container.

@martinpitt
Copy link
Member Author

I updated the master and f28 Fedora container branches and did a build:

repositories:
  candidate-registry.fedoraproject.org/f28/cockpit:f28-container-candidate-92075-20180502205553
  candidate-registry.fedoraproject.org/f28/cockpit:0-1.f28container
  candidate-registry.fedoraproject.org/f28/cockpit:0
  candidate-registry.fedoraproject.org/f28/cockpit:latest

However, I don't know how to publish that to actually become a released Fedora Registry container. @stefwalter , do you know?

@stefwalter
Copy link
Contributor

No don't know ... maybe @petervo does. Or @dustymabe

@martinpitt
Copy link
Member Author

#fedora-releng says to file a releng ticket, so I did: https://pagure.io/releng/issue/7483

@martinpitt martinpitt added blocked Don't land until something else happens first (see task list) and removed needswork blocked Don't land until something else happens first (see task list) labels May 3, 2018
@martinpitt
Copy link
Member Author

f28 container was published, rebuilding image

@cockpituous
Copy link
Contributor

image-refresh in progress on cockpit-tasks-f85z1.
Log: http://fedorapeople.org/groups/cockpit/logs/image-refresh-9090-20180503-205555/

@cockpituous cockpituous changed the title bots: Adjust for Fedora Atomic now being version 28 WIP: cockpit-tasks-f85z1: bots: Adjust for Fedora Atomic now being version 28 May 3, 2018
@cockpituous
Copy link
Contributor

@cockpituous cockpituous changed the title WIP: cockpit-tasks-f85z1: bots: Adjust for Fedora Atomic now being version 28 bots: Adjust for Fedora Atomic now being version 28 May 3, 2018
@martinpitt
Copy link
Member Author

I figured out the fedora-atomic.install failure and pushed a fix. This now formally affects the other atomics too, so triggering tests for them.

@martinpitt
Copy link
Member Author

Two ostree failures, let's retry to see if they are flakes.

@martinpitt
Copy link
Member Author

Debugging check-ostree OstreeRestartCase.testOstree: Screenshot says open(O_TMPFILE): No such file or directory. This is reflected in the journal:

Initiated txn DownloadUpdateRpmDiff for caller :1.36: /org/projectatomic/rpmostree1/fedora_atomic
libostree pull from 'local' for fedora/28/x86_64/atomic-host complete
Txn DownloadUpdateRpmDiff on /org/projectatomic/rpmostree1/fedora_atomic failed: open(O_TMPFILE): No such file or directory

I don't have an immediate idea what this does (there is a lot of setup in the test case to create a local repo). I asked @cgwalters on IRC, and I'll deep-dive into what this does.

@@ -93,7 +93,7 @@ class AtomicCockpitInstaller:
subprocess.call(["ostree", "remote", "delete", "local"])

subprocess.check_call(["ostree", "remote", "add", "local",
"file:///{}".format(self.repo_location),
"file://{}".format(self.repo_location),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a libcurl change FWIW.

cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request May 4, 2018
In cockpit-project/cockpit#9090 (comment)
we're seeing:
`Txn DownloadUpdateRpmDiff ... failed: open(O_TMPFILE): No such file or directory`

Looking at the error paths in the rpmdb diff code, there's not really
any error prefixing.  Let's add some so this is easier to debug.
rh-atomic-bot pushed a commit to coreos/rpm-ostree that referenced this pull request May 4, 2018
In cockpit-project/cockpit#9090 (comment)
we're seeing:
`Txn DownloadUpdateRpmDiff ... failed: open(O_TMPFILE): No such file or directory`

Looking at the error paths in the rpmdb diff code, there's not really
any error prefixing.  Let's add some so this is easier to debug.

Closes: #1356
Approved by: jlebon
@cgwalters
Copy link
Contributor

I filed coreos/rpm-ostree#1360

@martinpitt
Copy link
Member Author

I pushed a workaround for coreos/rpm-ostree#1360; this fixes OstreeCase.testRemoteManagement and gets further in OstreeRestartCase.testOstree; but that now fails like this:

Traceback (most recent call last):
  File "test/verify/check-ostree", line 333, in testOstree
    b.wait_present('table.listing-ct tbody:nth-child(3) i.fa-circle')
  File "/home/martin/upstream/c3/test/common/testlib.py", line 270, in wait_present
    return self.wait_js_func('ph_is_present', selector)
  File "/home/martin/upstream/c3/test/common/testlib.py", line 264, in wait_js_func
    self.wait_js_cond("%s(%s)" % (func, ','.join(map(jsquote, args))))
  File "/home/martin/upstream/c3/test/common/testlib.py", line 261, in wait_js_cond
    self.raise_cdp_exception("timeout\nwait_js_cond", cond, result["exceptionDetails"], trailer)
  File "/home/martin/upstream/c3/test/common/testlib.py", line 166, in raise_cdp_exception
    raise Error("%s(%s): %s" % (func, arg, msg))
Error: timeout
wait_js_cond(ph_is_present("table.listing-ct tbody:nth-child(3) i.fa-circle")): condition did not become true
warning: error: [7] Couldn't connect to server

5 lines before the end.. :-/

After reboot it looks like this:

ostreerestartcase-testostree-fedora-atomic-127 0 0 2-2201-fail

The test says "After reboot upgrade but no rollback target" - but there actually is. It seems that after upgrading to base.2 and rolling back (to base.1), it now offers a rollback to "base.2", which would actually be a "roll forward"? This sounds like some ostree behaviour change, which might actually be desired? @cgwalters, is rpm-ostree rollback supposed to flip back and forth between the two latest revisions?

On F27 it instead looks like this, i. e. the order is reversed and no rollback option:

ostree

On the CLI the behaviour between F27 and F28 are similar:

# rpm-ostree status
State: idle; auto updates disabled
Deployments:
● ostree://local:fedora/28/x86_64/atomic-host
                   Version: cockpit-base.1 (2018-05-09 16:13:32)
                    Commit: c2f8ecaf112c4ba559789198065c8cb30b355c4104f3c9e2b20cef9e3dbb8ff3
              GPGSignature: Valid signature by 95A8BA1754D0E95E2B3A98A7EE15015654780CBD

  ostree://local:fedora/28/x86_64/atomic-host
                   Version: cockpit-base.2 (2018-05-09 16:16:58)
                    Commit: 2f3f0373ccea3b9cbfb332721d571bdb68a6acb413cdd70422d85f499ccf4a2a
              GPGSignature: Valid signature by 95A8BA1754D0E95E2B3A98A7EE15015654780CBD

# rpm-ostree rollback 
Moving '81527dbd85f9033a0be44213b1656664ead2d199bb308262dbd1082cee95c440.0' to be first deployment
Transaction complete; bootconfig swap: no deployment count change: 0
Upgraded:
  cockpit-machines 167.x-1.wip.fc28 -> 99999-2
Downgraded:
  cockpit-ostree 167.x-1.wip.fc28 -> wip-0.1
Removed:
  cockpit-docker-167.x-1.wip.fc28.x86_64
Added:
  empty-1-0.noarch
Run "systemctl reboot" to start a reboot

# rpm-ostree status
State: idle; auto updates disabled
Deployments:
  ostree://local:fedora/28/x86_64/atomic-host
                   Version: cockpit-base.2 (2018-05-09 16:45:33)
                    Commit: 81527dbd85f9033a0be44213b1656664ead2d199bb308262dbd1082cee95c440
              GPGSignature: Valid signature by 95A8BA1754D0E95E2B3A98A7EE15015654780CBD

● ostree://local:fedora/28/x86_64/atomic-host
                   Version: cockpit-base.1 (2018-05-09 16:13:32)
                    Commit: c2f8ecaf112c4ba559789198065c8cb30b355c4104f3c9e2b20cef9e3dbb8ff3
              GPGSignature: Valid signature by 95A8BA1754D0E95E2B3A98A7EE15015654780CBD

I. e. on both images rollback just flips between the two versions. But with the API/JSON, F27 retains a constant order of the revisions while on F28 the order changes.

@cgwalters, does that ring a bell by any chance?

@cgwalters
Copy link
Contributor

rollback has always behaved that way, though I can't say it was really well thought through as far as the UX. The implementation is basically to just swap the bootloader order; the idea here is if something went wrong we don't want to do complex operations.

Stef helped add the concept of deploy partly because of this - it's predictable, whereas rollback takes you to something that depends on history.

Desynchronzation between the CLI and DBus sounds like:

Basically there were some cases where we were either missing a reload or it was racy.

I guess the bottom line is the test cases will probably have to work both ways?

@martinpitt
Copy link
Member Author

I guess the bottom line is the test cases will probably have to work both ways?

Yes, I agree. Either behaviour makes sense, so let's accept both. Thanks Colin!

martinpitt and others added 5 commits May 14, 2018 10:01
There was an extra `/` in the "local" remote URL which is now illegal in
Fedora 28:
```
file:////var/local-repo
error: [3] URL using bad/illegal format or missing URL
```
The download path changed, there is no CloudImages/ subdir any more.
The qcow images moved to AtomicHost/ instead.

Closes cockpit-project#9090
Checking for updates with a local repository fails with

    Initiated txn DownloadUpdateRpmDiff for caller :1.36: /org/projectatomic/rpmostree1/fedora_atomic
    libostree pull from 'local' for fedora/28/x86_64/atomic-host complete
    Txn DownloadUpdateRpmDiff on /org/projectatomic/rpmostree1/fedora_atomic failed: open(O_TMPFILE): No such file or directory

Pre-create the missing /var/cache/rpm-ostree/ directory for the time
being, until this is fixed.
Previously, when rolling back from base.2 to base.1, base.2 appeared
again as normal available update. Now rpm-ostree flips between the two
with "rollback" and reverses the order.

Both behaviours make sense and got ack'ed by upstream, so expect the new
behaviour for current fedora-atomic.

Also verify that the order is as expected for the old behaviour.
@martinpitt
Copy link
Member Author

Adjusted the tests for new rollback behaviour.

@martinpitt martinpitt requested a review from larskarlitski May 14, 2018 09:39
Copy link
Contributor

@larskarlitski larskarlitski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot! Sorry that there was so much breakage here.

@larskarlitski larskarlitski merged commit 4c18e51 into cockpit-project:master May 14, 2018
larskarlitski pushed a commit that referenced this pull request May 14, 2018
The download path changed, there is no CloudImages/ subdir any more.
The qcow images moved to AtomicHost/ instead.

Closes #9090
@martinpitt martinpitt deleted the fedora-atomic-28 branch May 14, 2018 16:01
@martinpitt martinpitt mentioned this pull request May 15, 2018
2 tasks
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.

5 participants