Bug 2209924 - D-Bus: OCI deployments fail with "Generating update variant: Invalid refspec"
Summary: D-Bus: OCI deployments fail with "Generating update variant: Invalid refspec"
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm-ostree
Version: 38
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Colin Walters
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-05-25 08:51 UTC by Martin Pitt
Modified: 2023-07-25 17:10 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)
python GDBus GI reproducer (1.55 KB, text/plain)
2023-05-25 08:51 UTC, Martin Pitt
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FC-844 0 None None None 2023-05-25 08:53:44 UTC

Description Martin Pitt 2023-05-25 08:51:01 UTC
I am currently working on making https://github.com/cockpit-project/cockpit-ostree/ fit for OCI based deployments. I noticed that I run into a lot of "Invalid refspec" errors when trying to deploy a registry image with a tag name, such as quay.io/fedora/fedora-coreos:stable . This works fine for "untagged" (well, implied "latest") OCI names, like I use on my personal laptop with 
ghcr.io/martinpitt/workstation-ostree-config.

This doesn't seem to happen with the rpm-ostree CLI, just through the D-Bus API. rpm-ostreed is rather hard to talk to via D-Bus, this is impossible to show with busctl/gdbus, due to the private D-Bus transaction. So I wrote a standalone Python reproducer using GDBus through GI (dbus-python cannot really do this either).

Reproducible: Always

Steps to Reproduce:
1. rpm-ostree rebase ostree-unverified-registry:quay.io/fedora/fedora-coreos:stable
2. reboot
3. rpm-ostree install -A python3-gobject-base gobject-introspection
4. python3 rpm-ostree-check-update.py

Actual Results:  
unix:path=/run/rpm-ostree-transaction.sock
Start: True
transaction signal org.projectatomic.rpmostree1.Transaction.Message ('Pulling manifest: ostree-unverified-image:docker://quay.io/fedora/fedora-coreos:stable',)
transaction signal org.projectatomic.rpmostree1.Transaction.ProgressEnd ()
transaction signal org.projectatomic.rpmostree1.Transaction.Message ('No upgrade available.',)
transaction signal org.projectatomic.rpmostree1.Transaction.Finished (false, 'Generating update variant: Invalid refspec ostree-unverified-registry:quay.io/fedora/fedora-coreos:stable')


Expected Results:  
On my personal laptop which uses a container image name without a tag (i.e. "latest"), this works fine:

booted: /org/projectatomic/rpmostree1/fedora
unix:path=/run/rpm-ostree-transaction.sock
Start: True
transaction signal org.projectatomic.rpmostree1.Transaction.Message ('Pulling manifest: ostree-unverified-image:docker://ghcr.io/martinpitt/workstation-ostree-config',)
transaction signal org.projectatomic.rpmostree1.Transaction.ProgressEnd ()
transaction signal org.projectatomic.rpmostree1.Transaction.Message ('No upgrade available.',)
transaction signal org.projectatomic.rpmostree1.Transaction.Finished (true, '')

Comment 1 Martin Pitt 2023-05-25 08:51:54 UTC
Created attachment 1966814 [details]
python GDBus GI reproducer

Comment 2 Martin Pitt 2023-05-25 09:37:31 UTC
Hmm, apparently it's not the tag name. I changed our integration tests to use "latest", and I'm still getting

    Generating update variant: Invalid refspec ostree-unverified-registry:localhost:5000/ostree-oci

Deployments:
● ostree-unverified-registry:localhost:5000/ostree-oci
                   Digest: sha256:da2503574d72f4cd0982060416ef1d47f3ce8db23821e660029bbce03c0d5353
                  Version: cockpit-base.1 (2023-05-25T09:13:30Z)

`rpm-ostree upgrade --download-only` works fine, though. Adjusting the title accordingly.

Comment 3 Martin Pitt 2023-05-25 16:21:46 UTC
> Steps to Reproduce

Sorry, I forgot an important step to enable GDBus through GI. Full reproducer:

1. rpm-ostree rebase ostree-unverified-registry:quay.io/fedora/fedora-coreos:stable
2. reboot
3. rpm-ostree install -A python3-gobject-base gobject-introspection
4. python3 rpm-ostree-check-update.py

Comment 4 Colin Walters 2023-06-20 12:29:41 UTC
This may relate to https://github.com/coreos/rpm-ostree/issues/4176

Comment 5 Martin Pitt 2023-07-24 05:16:13 UTC
I'd really appreciate a quick check if we are using the API wrong, or if this is an actual bug in rpm-ostree. I noticed https://github.com/coreos/rpm-ostree/issues/4176 as well, but it has a different symptom. May be the same root cause, of course.

Thanks!

Comment 6 Colin Walters 2023-07-25 16:02:23 UTC
I'm pretty sure it's just a dup of 4176 with the same root cause.  We have https://github.com/coreos/rpm-ostree/pull/4486 inbound to attempt to fix it.

Comment 7 Martin Pitt 2023-07-25 17:10:25 UTC
Thanks Colin! I subscribed to that PR.


Note You need to log in before you can comment on or make changes to this bug.