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

Add rpm-ostree network-wait #3096

Open
cgwalters opened this issue Aug 27, 2021 · 3 comments · May be fixed by #3981
Open

Add rpm-ostree network-wait #3096

cgwalters opened this issue Aug 27, 2021 · 3 comments · May be fixed by #3981
Assignees
Labels
good-first-issue good issue for someone new jira for syncing to jira

Comments

@cgwalters
Copy link
Member

I followed the docs for https://docs.fedoraproject.org/en-US/fedora-coreos/os-extensions/
and of course hit a race between network-online.target and actually being able to fetch the repos.

The idea of network-wait would be:

For each configured ostree remote and each enabled yum repository, wait until we can reach those over the network.

We could add rpm-ostree install -N to network-wait. It's actually kind of tempting to make it the default...

See also https://gitlab.gnome.org/GNOME/glib/-/blob/main/gio/gnetworkmonitor.h which would be good to use for this.

This also strongly relates to #3041 (comment)

Also zincati could (should) use this instead of polling.

@cgwalters
Copy link
Member Author

Another thing we could do here is add retries; something like rpm-ostree install --retries=3 foo. We should also look at whether yum/dnf have a config flag for this we could honor.

@jlebon
Copy link
Member

jlebon commented Jul 28, 2022

Another approach is to return a special exit code which can conveniently then be used in systemd units with e.g. RestartForceExitStatus=.

@cgwalters
Copy link
Member Author

rpm-software-management/librepo#259 for the librepo side.

That said...we could also do the network-wait stuff on the libostree side. Speaking as an ostree upstream maintainer I'm 100% on board with adding an API to do this. And in most cases, if we wait on the network availability for the configured base ostree repository, my instinct says that in most cases the configured yum repositories are also accessible.

(OTOH, this network-wait thing would need to be implemented again for container remotes...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good-first-issue good issue for someone new jira for syncing to jira
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants