Skip to content

tests/rhcos/upgrade: drop use of sudo for unpriv pods#2830

Merged
miabbott merged 1 commit intocoreos:mainfrom
miabbott:rhcos_upgrade_unpriv
Apr 28, 2022
Merged

tests/rhcos/upgrade: drop use of sudo for unpriv pods#2830
miabbott merged 1 commit intocoreos:mainfrom
miabbott:rhcos_upgrade_unpriv

Conversation

@miabbott
Copy link
Copy Markdown
Member

When running the rhcos.upgrade.from-ocp-rhcos test in an
unprivileged pod in the Prow clusters, the test fails during the
unpacking of the oc binary because it is trying to use sudo to
write to /usr/bin.

To work around this, remove the use of sudo and split the curl and
tar commands into separate calls. (Using bash -c wasn't working
for me locally or in cluster)

@miabbott
Copy link
Copy Markdown
Member Author

See openshift/os#786 (comment)

We'll need this backported to rhcos-4.10 at least

@miabbott miabbott requested a review from mike-nguyen April 25, 2022 14:14
@miabbott
Copy link
Copy Markdown
Member Author

FCOS pipeline failed on

[2022-04-25T15:32:39.050Z] === RUN   ext.config.chrony.dhcp-propagation
[2022-04-25T15:47:45.709Z] --- FAIL: ext.config.chrony.dhcp-propagation (904.32s)
[2022-04-25T15:47:45.710Z]         harness.go:103: TIMEOUT[15m0s]: ssh: sudo ./kolet run-test-unit kola-runext.service
[2022-04-25T15:47:45.710Z]         harness.go:103: TIMEOUT[15m0s]: ssh: journalctl -t kola-runext-dhcp-propagation

...which is entirely unrelated to this change

@miabbott
Copy link
Copy Markdown
Member Author

kola-f598b839.tar.gz

dustymabe
dustymabe previously approved these changes Apr 25, 2022
Copy link
Copy Markdown
Member

@dustymabe dustymabe left a comment

Choose a reason for hiding this comment

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

LGTM

@miabbott
Copy link
Copy Markdown
Member Author

Same test is failing on RHCOS, too.

Looks like it both cases it is waiting indefinitely for the NTP server to appear:

Apr 25 16:29:36.791984 kola-runext-dhcp-propagation[2128]: + echo 'waiting for ntp server to appear'
Apr 25 16:29:36.791984 kola-runext-dhcp-propagation[2128]: waiting for ntp server to appear
Apr 25 16:29:36.791984 kola-runext-dhcp-propagation[2128]: + sleep 1
Apr 25 16:29:37.795561 kola-runext-dhcp-propagation[2128]: + retries=260
Apr 25 16:29:37.795561 kola-runext-dhcp-propagation[2128]: + [[ 260 -gt 0 ]]
Apr 25 16:29:37.795561 kola-runext-dhcp-propagation[2128]: + [[ ! MS Name/IP address         Stratum Poll Reach LastRx Last sample
Apr 25 16:29:37.795561 kola-runext-dhcp-propagation[2128]: ===============================================================================
Apr 25 16:29:37.795561 kola-runext-dhcp-propagation[2128]: ^- mail.morbitzer.de             2   6   377    54   +245us[ +277us] +/-   55ms
Apr 25 16:29:37.795561 kola-runext-dhcp-propagation[2128]: ^- time2.unima.ac.id             2   6   377    51  +5440us[+5472us] +/-  210ms
Apr 25 16:29:37.795561 kola-runext-dhcp-propagation[2128]: ^- skarabrae.draxinusom.ch       2   6   377    53   +364us[ +396us] +/-   71ms
Apr 25 16:29:37.795561 kola-runext-dhcp-propagation[2128]: ^+ time.cloudflare.com           3   6   377    54   -151us[ -119us] +/-   16ms
Apr 25 16:29:37.795561 kola-runext-dhcp-propagation[2128]: ^* 129.6.15.30                   1   6   377    47   +348us[ +380us] +/- 9302us =~ time-c-g\.nist\.gov ]]
Apr 25 16:29:37.796631 kola-runext-dhcp-propagation[2128]: ++ chronyc sources
Apr 25 16:29:47.819589 kola-runext-dhcp-propagation[2128]: + NTPSERVER='MS Name/IP address         Stratum Poll Reach LastRx Last sample
Apr 25 16:29:47.819589 kola-runext-dhcp-propagation[2128]: ===============================================================================
Apr 25 16:29:47.819589 kola-runext-dhcp-propagation[2128]: ^- mail.morbitzer.de             2   6   377    65   +245us[ +277us] +/-   55ms
Apr 25 16:29:47.819589 kola-runext-dhcp-propagation[2128]: ^- time2.unima.ac.id             2   6   377    62  +5440us[+5472us] +/-  210ms
Apr 25 16:29:47.819589 kola-runext-dhcp-propagation[2128]: ^- skarabrae.draxinusom.ch       2   6   377    64   +364us[ +396us] +/-   71ms
Apr 25 16:29:47.819589 kola-runext-dhcp-propagation[2128]: ^+ time.cloudflare.com           3   6   377     1   -313us[ -313us] +/-   15ms
Apr 25 16:29:47.819589 kola-runext-dhcp-propagation[2128]: ^* 129.6.15.30                   1   6   377    58   +348us[ +380us] +/- 9302us'
Apr 25 16:29:47.819589 kola-runext-dhcp-propagation[2128]: + [[ MS Name/IP address         Stratum Poll Reach LastRx Last sample
Apr 25 16:29:47.819589 kola-runext-dhcp-propagation[2128]: ===============================================================================
Apr 25 16:29:47.819589 kola-runext-dhcp-propagation[2128]: ^- mail.morbitzer.de             2   6   377    65   +245us[ +277us] +/-   55ms
Apr 25 16:29:47.819589 kola-runext-dhcp-propagation[2128]: ^- time2.unima.ac.id             2   6   377    62  +5440us[+5472us] +/-  210ms
Apr 25 16:29:47.819589 kola-runext-dhcp-propagation[2128]: ^- skarabrae.draxinusom.ch       2   6   377    64   +364us[ +396us] +/-   71ms
Apr 25 16:29:47.819589 kola-runext-dhcp-propagation[2128]: ^+ time.cloudflare.com           3   6   377     1   -313us[ -313us] +/-   15ms
Apr 25 16:29:47.819589 kola-runext-dhcp-propagation[2128]: ^* 129.6.15.30                   1   6   377    58   +348us[ +380us] +/- 9302us != *\t\i\m\e\-\c\-\g\.\n\i\s\t\.\g\o\v* ]]
Apr 25 16:29:47.819589 kola-runext-dhcp-propagation[2128]: + echo 'waiting for ntp server to appear'
Apr 25 16:29:47.819589 kola-runext-dhcp-propagation[2128]: waiting for ntp server to appear
Apr 25 16:29:47.819589 kola-runext-dhcp-propagation[2128]: + sleep 1
Apr 25 16:29:48.823072 kola-runext-dhcp-propagation[2128]: + retries=259
Apr 25 16:29:48.823072 kola-runext-dhcp-propagation[2128]: + [[ 259 -gt 0 ]]
Apr 25 16:29:48.823072 kola-runext-dhcp-propagation[2128]: + [[ ! MS Name/IP address         Stratum Poll Reach LastRx Last sample
Apr 25 16:29:48.823072 kola-runext-dhcp-propagation[2128]: ===============================================================================
Apr 25 16:29:48.823072 kola-runext-dhcp-propagation[2128]: ^- mail.morbitzer.de             2   6   377    65   +245us[ +277us] +/-   55ms
Apr 25 16:29:48.823072 kola-runext-dhcp-propagation[2128]: ^- time2.unima.ac.id             2   6   377    62  +5440us[+5472us] +/-  210ms
Apr 25 16:29:48.823072 kola-runext-dhcp-propagation[2128]: ^- skarabrae.draxinusom.ch       2   6   377    64   +364us[ +396us] +/-   71ms
Apr 25 16:29:48.823072 kola-runext-dhcp-propagation[2128]: ^+ time.cloudflare.com           3   6   377     1   -313us[ -313us] +/-   15ms
Apr 25 16:29:48.823072 kola-runext-dhcp-propagation[2128]: ^* 129.6.15.30                   1   6   377    58   +348us[ +380us] +/- 9302us =~ time-c-g\.nist\.gov ]]
Apr 25 16:29:48.824277 kola-runext-dhcp-propagation[2128]: ++ chronyc sources
Apr 25 16:29:58.847406 kola-runext-dhcp-propagation[2128]: + NTPSERVER='MS Name/IP address         Stratum Poll Reach LastRx Last sample
Apr 25 16:29:58.847406 kola-runext-dhcp-propagation[2128]: ===============================================================================
Apr 25 16:29:58.847406 kola-runext-dhcp-propagation[2128]: ^- mail.morbitzer.de             2   6   377    11   +302us[ +323us] +/-   55ms
Apr 25 16:29:58.847406 kola-runext-dhcp-propagation[2128]: ^- time2.unima.ac.id             2   6   377     8  +4721us[+4742us] +/-  210ms
Apr 25 16:29:58.847406 kola-runext-dhcp-propagation[2128]: ^- skarabrae.draxinusom.ch       2   6   377    10   +583us[ +604us] +/-   71ms
Apr 25 16:29:58.847406 kola-runext-dhcp-propagation[2128]: ^+ time.cloudflare.com           3   6   377    12   -334us[ -313us] +/-   15ms
Apr 25 16:29:58.847406 kola-runext-dhcp-propagation[2128]: ^* 129.6.15.30                   1   6   377     5   +324us[ +345us] +/- 9309us'
Apr 25 16:29:58.847406 kola-runext-dhcp-propagation[2128]: + [[ MS Name/IP address         Stratum Poll Reach LastRx Last sample
Apr 25 16:29:58.847406 kola-runext-dhcp-propagation[2128]: ===============================================================================
Apr 25 16:29:58.847406 kola-runext-dhcp-propagation[2128]: ^- mail.morbitzer.de             2   6   377    11   +302us[ +323us] +/-   55ms
Apr 25 16:29:58.847406 kola-runext-dhcp-propagation[2128]: ^- time2.unima.ac.id             2   6   377     8  +4721us[+4742us] +/-  210ms
Apr 25 16:29:58.847406 kola-runext-dhcp-propagation[2128]: ^- skarabrae.draxinusom.ch       2   6   377    10   +583us[ +604us] +/-   71ms
Apr 25 16:29:58.847406 kola-runext-dhcp-propagation[2128]: ^+ time.cloudflare.com           3   6   377    12   -334us[ -313us] +/-   15ms
Apr 25 16:29:58.847406 kola-runext-dhcp-propagation[2128]: ^* 129.6.15.30                   1   6   377     5   +324us[ +345us] +/- 9309us != *\t\i\m\e\-\c\-\g\.\n\i\s\t\.\g\o\v* ]]
Apr 25 16:29:58.847406 kola-runext-dhcp-propagation[2128]: + echo 'waiting for ntp server to appear'
Apr 25 16:29:58.847406 kola-runext-dhcp-propagation[2128]: waiting for ntp server to appear
Apr 25 16:29:58.847406 kola-runext-dhcp-propagation[2128]: + sleep 1
Apr 25 16:29:59.850573 kola-runext-dhcp-propagation[2128]: + retries=258
Apr 25 16:29:59.850573 kola-runext-dhcp-propagation[2128]: + [[ 258 -gt 0 ]]
Apr 25 16:29:59.850573 kola-runext-dhcp-propagation[2128]: + [[ ! MS Name/IP address         Stratum Poll Reach LastRx Last sample
Apr 25 16:29:59.850573 kola-runext-dhcp-propagation[2128]: ===============================================================================
Apr 25 16:29:59.850573 kola-runext-dhcp-propagation[2128]: ^- mail.morbitzer.de             2   6   377    11   +302us[ +323us] +/-   55ms
Apr 25 16:29:59.850573 kola-runext-dhcp-propagation[2128]: ^- time2.unima.ac.id             2   6   377     8  +4721us[+4742us] +/-  210ms
Apr 25 16:29:59.850573 kola-runext-dhcp-propagation[2128]: ^- skarabrae.draxinusom.ch       2   6   377    10   +583us[ +604us] +/-   71ms
Apr 25 16:29:59.850573 kola-runext-dhcp-propagation[2128]: ^+ time.cloudflare.com           3   6   377    12   -334us[ -313us] +/-   15ms
Apr 25 16:29:59.850573 kola-runext-dhcp-propagation[2128]: ^* 129.6.15.30                   1   6   377     5   +324us[ +345us] +/- 9309us =~ time-c-g\.nist\.gov ]]
Apr 25 16:29:59.851607 kola-runext-dhcp-propagation[2128]: ++ chronyc sources

@miabbott
Copy link
Copy Markdown
Member Author

miabbott commented Apr 25, 2022

@sohankunkerkar you have experience with the failing test case; could you look into these failures?

Edit: created issue - coreos/fedora-coreos-tracker#1184

@dustymabe
Copy link
Copy Markdown
Member

/retest

Comment thread mantle/kola/tests/rhcos/upgrade.go Outdated
When running the `rhcos.upgrade.from-ocp-rhcos` test in an
unprivileged pod in the Prow clusters, the test fails during the
unpacking of the `oc` binary because it is trying to use `sudo` to
write to `/usr/bin`.

But since #2777 we have
the `oc` binary installed in `cosa`, so just drop the code doing the
install of the binary.
@miabbott
Copy link
Copy Markdown
Member Author

fatal: unable to access 'https://github.com/openshift/os/': Could not resolve host: github.com 🤔

/retest

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.

4 participants