-
Notifications
You must be signed in to change notification settings - Fork 35
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
[FEATURE] Add check_internet_connection function #102
base: master
Are you sure you want to change the base?
Conversation
7cb21c5
to
2097214
Compare
transactional-update is also present on systems with e.g. wicked. There is no dependency to NetworkManager. |
Sure, I'm gonna split the PR and research whether wicked has a similar facility, otherwise we can put a condition there. |
2097214
to
d9938a3
Compare
d9938a3
to
3ce871e
Compare
Wicked doesn't seem to have anything similar to |
I had an interesting experience. I installed Wicked here and it pulled in sysconfig-netconfig, which in turn messed up name resolution. And So if we go forward with this proposition of mine, we'd be better off using |
3ce871e
to
af18f91
Compare
Alright, this should be ready, only waiting for #103 that I really would love to see getting merged. I dropped the use of |
I'm gonna hold on on the re-indentation PR for now, and focus on redoing the check_internet_connection to not depend on that so we can move on discussing/declining it. I do believe this check is interesting to have, since it will short-circuit the whole update transaction even before calling Zypper, since it makes sure we can resolve names (no only that we have internet connectivity) first. |
Make sure that the system is online, by checking system's domain name resolvability, with the help of nslookup tool. It waits up to 30 seconds (by default), while probing known worl-wide resilient internet domains, to try to make up for loss of connectivity - especially for systems with suspension enabled where after waking up they don't come back online quick enough - before doing any operation that involves downloading data with Zypper. This feature also acts as a short-circuit for Zypper transactions bound to fail due to working connection unavailability.
af18f91
to
9e78bc1
Compare
I made the assumption that transactional-update are only present in systems with NetworkManager. In case that's not true, please let me know so I can adjust it.
Please note that I haven't actually tested these changes as I'm not able to, currently. If someone could do some testing, it would be much appreciated by me.