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

Automatic rpm-ostree update service fails to run #90

Closed
fiftydinar opened this issue Aug 9, 2023 · 10 comments
Closed

Automatic rpm-ostree update service fails to run #90

fiftydinar opened this issue Aug 9, 2023 · 10 comments

Comments

@fiftydinar
Copy link
Contributor

fiftydinar commented Aug 9, 2023

I always consistently got this error, no matter if it's 04:00AM or other time since around 10 days ago:

error: Creating importer: Failed to invoke skopeo proxy method OpenImage: remote error: pinging container registry ghcr.io: Get "https://ghcr.io/v2/": dial tcp: lookup ghcr.io: Temporary failure in name resolution

All people which tried to help me told me to check if DNS functions properly on my router.
I checked it & here are the results: router + Cloudflare DNS work properly, everything, including ghcr.io pings positively.

So, that is not the issue.

I & some other user were the only ones with the issue, while other user (Bigpod) verified to me that rpm automatic updates works in his case. Which assumes that most users did not have this issue unlike me & silverblueperson (Discord username). Than, after around 5-6 days, other user complained with the same issue as me.

I am not sure how to log this, as this is the only error I get from the systemd service.

I tried to troubleshoot it by manually running the rpm-ostree upgrade command & by manually running the systemd automatic rpm-ostree upgrade service. Both results went positive...

It is very weird.

@castrojo
Copy link
Member

I don't have time to dig into this today but we set the value to stage in this service and make no other changes, so not sure what is going on here. This service has been reliable for me for years so maybe there was a new version or something changed?

@bsherman
Copy link
Contributor

I don't have time to dig into this today but we set the value to stage in this service and make no other changes, so not sure what is going on here. This service has been reliable for me for years so maybe there was a new version or something changed?

The change was in https://github.com/ublue-os/config/pull/84/files#diff-f1bc9c48a9bad1cf5a8198ee3434651663e8c497ffd9afdfcc915b0b2df382b7

The new timer works fine for anyone who leaves the computer on all night, or maybe after a resume from sleep, but sometimes, on a boot/resume from a machine which was off when the timer should have run, DNS resolution is not available. I think we may just need to add the following to the service.

Wants=network-online.target
After=network-online.target

At least, that's a good first step.

bsherman pushed a commit that referenced this issue Aug 12, 2023
For fixing this issue:
#90

"Temporary failure in name resolution"

Override the service instead of making the changes directly.
@bsherman
Copy link
Contributor

With the PR merged for this we can probably close this issue, but it's OK to wait a few for any feedback that it is/isn't working.

@fiftydinar
Copy link
Contributor Author

I can confirm that the issue is fixed!
Screenshot from 2023-08-14 13-17-35

@lorduskordus
Copy link

Still doesn't work for me. Manual updates work OK, automatic update 1h after fresh boot works ok. If I sleep through the timer, the service fails with this error.

@fiftydinar fiftydinar reopened this Aug 26, 2023
@bsherman
Copy link
Contributor

Still doesn't work for me. Manual updates work OK, automatic update 1h after fresh boot works ok. If I sleep through the timer, the service fails with this error.

Can you provide the output of the following commands after the system wakes from an overnight sleep, etc?

systemctl status rpm-ostreed-automatic.timer

systemctl status rpm-ostreed-automatic.service

rpm-ostree status

Thank you.

@lorduskordus
Copy link

Still doesn't work for me. Manual updates work OK, automatic update 1h after fresh boot works ok. If I sleep through the timer, the service fails with this error.

Can you provide the output of the following commands after the system wakes from an overnight sleep, etc?

systemctl status rpm-ostreed-automatic.timer

systemctl status rpm-ostreed-automatic.service

rpm-ostree status

Thank you.

Sure.

systemctl status rpm-ostreed-automatic.timer
● rpm-ostreed-automatic.timer - rpm-ostree Automatic Update Trigger
     Loaded: loaded (/usr/lib/systemd/system/rpm-ostreed-automatic.timer; enabled; preset: disabled)
    Drop-In: /etc/systemd/system/rpm-ostreed-automatic.timer.d
             └─override.conf
     Active: active (waiting) since Fri 2023-08-25 18:15:38 CEST; 23h ago
    Trigger: Sun 2023-08-27 04:05:28 CEST; 10h left
   Triggers: ● rpm-ostreed-automatic.service
       Docs: man:rpm-ostree(1)
             man:rpm-ostreed.conf(5)

srp 25 18:15:38 uniwill systemd[1]: Started rpm-ostreed-automatic.timer - rpm-ostree Automatic Update Trigger.
systemctl status rpm-ostreed-automatic.service
× rpm-ostreed-automatic.service - rpm-ostree Automatic Update
     Loaded: loaded (/usr/lib/systemd/system/rpm-ostreed-automatic.service; static)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf
             /etc/systemd/system/rpm-ostreed-automatic.service.d
             └─override.conf
     Active: failed (Result: exit-code) since Sat 2023-08-26 07:57:39 CEST; 9h ago
   Duration: 237ms
TriggeredBy: ● rpm-ostreed-automatic.timer
       Docs: man:rpm-ostree(1)
             man:rpm-ostreed.conf(5)
    Process: 82339 ExecStart=rpm-ostree upgrade --quiet --trigger-automatic-update-policy (code=exited, status=1/FAILURE)
   Main PID: 82339 (code=exited, status=1/FAILURE)
        CPU: 42ms

srp 26 07:57:38 uniwill systemd[1]: Started rpm-ostreed-automatic.service - rpm-ostree Automatic Update.
srp 26 07:57:39 uniwill rpm-ostree[82339]: error: Creating importer: Failed to invoke skopeo proxy method OpenImage: remote error: pinging container registry ghcr.io: Get "https://ghcr.io/v2/": dial tcp: lookup ghcr.io: Temporary failure in name resolution
srp 26 07:57:39 uniwill systemd[1]: rpm-ostreed-automatic.service: Main process exited, code=exited, status=1/FAILURE
srp 26 07:57:39 uniwill systemd[1]: rpm-ostreed-automatic.service: Failed with result 'exit-code'.
rpm-ostree status
State: idle
AutomaticUpdates: stage; rpm-ostreed-automatic.service: last run failed
Deployments:
● ostree-image-signed:docker://ghcr.io/lorduskordus/ublue-gnome-nvidia
                   Digest: sha256:ac2b610fe2015a23979b9e456e17c691ae2a163469ecd2f162ec128f1784a18b
                  Version: 38.20230825.0 (2023-08-25T15:57:27Z)

  ostree-image-signed:docker://ghcr.io/lorduskordus/ublue-gnome-nvidia
                   Digest: sha256:9d50d0904896f920b1a5d0e4e27d3354118047a4b79cc994521a5c1c4fc0d5ed
                  Version: 38.20230825.0 (2023-08-25T09:17:25Z)

  ostree-image-signed:docker://ghcr.io/lorduskordus/ublue-kde-nvidia
                   Digest: sha256:1ccf3997d043ae5af0faaca4e882062bf2c04719316099ce374f6b0bfb4395d0
                  Version: 38.20230818.0 (2023-08-18T14:25:40Z)
                   Pinned: yes

  ostree-image-signed:docker://ghcr.io/lorduskordus/ublue-gnome-nvidia
                   Digest: sha256:406bf83a998dbf7c851b99dab01db70e3114b82f59a2cbdb21a620a572a4313f
                  Version: 38.20230818.0 (2023-08-18T14:25:53Z)
                   Pinned: yes

@fiftydinar
Copy link
Contributor Author

Still doesn't work for me. Manual updates work OK, automatic update 1h after fresh boot works ok. If I sleep through the timer, the service fails with this error.

Can you provide the output of the following commands after the system wakes from an overnight sleep, etc?
systemctl status rpm-ostreed-automatic.timer
systemctl status rpm-ostreed-automatic.service
rpm-ostree status
Thank you.

Sure.

systemctl status rpm-ostreed-automatic.timer
systemctl status rpm-ostreed-automatic.service
rpm-ostree status

Does this issue still happen to you?

@lorduskordus
Copy link

Still doesn't work for me. Manual updates work OK, automatic update 1h after fresh boot works ok. If I sleep through the timer, the service fails with this error.

Can you provide the output of the following commands after the system wakes from an overnight sleep, etc?
systemctl status rpm-ostreed-automatic.timer
systemctl status rpm-ostreed-automatic.service
rpm-ostree status
Thank you.

Sure.
systemctl status rpm-ostreed-automatic.timer
systemctl status rpm-ostreed-automatic.service
rpm-ostree status

Does this issue still happen to you?

I've started using ublue-update on my machine a long time ago, but testing it now on my other machine, it seems to be working. After fresh boot, I let it sleep through the timer, no error and after another hour the service started and exited successfully.

@fiftydinar
Copy link
Contributor Author

Still doesn't work for me. Manual updates work OK, automatic update 1h after fresh boot works ok. If I sleep through the timer, the service fails with this error.

Can you provide the output of the following commands after the system wakes from an overnight sleep, etc?
systemctl status rpm-ostreed-automatic.timer
systemctl status rpm-ostreed-automatic.service
rpm-ostree status
Thank you.

Sure.
systemctl status rpm-ostreed-automatic.timer
systemctl status rpm-ostreed-automatic.service
rpm-ostree status

Does this issue still happen to you?

I've started using ublue-update on my machine a long time ago, but testing it now on my other machine, it seems to be working. After fresh boot, I let it sleep through the timer, no error and after another hour the service started and exited successfully.

That's good to hear.
I will close this issue.

Anyone who still has the same issue, feel free to ping me for reopening.

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

4 participants