-
Notifications
You must be signed in to change notification settings - Fork 29
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
RFE: make 01_update_platforms_check.sh
more intelligent/robust
#98
Comments
See also #71 |
Another complexity to be aware of: some Red Hat Edge systems will have the update URLs protected by entitlement certificates, so bare Any Or we come up with something else? |
I think all these are valid, easy additions that we can make (easily) and since the rewrite will support bare bash scripts like this I think it's worth doing Note to self: port this to Jira as we don't have the jira label in this repo |
The end point should still be reachable even if auth fails. The idea of the test was to ensure the network stack was working, routing, DNS, HTTP etc. |
We need to define "reachable" in this case. If we Or do we want to say that reachable == HTTP 200? The original version of the script (e1695a6) seems to imply that we care more about a successful HTTP code than a successful TCP connection. But in the testing of the endpoints provided by the Fleet Management system, we get HTTP 401 if no auth is provided.
And even if auth is provided, we get HTTP 405 because the HTTP GET method is not supported:
So in both of those examples, the endpoint is "reachable" in a TCP sense, but unreachable given the current mechanism that we test with. |
We '"reachable" in a TCP sense' is probably enough to no roll back as we know routing and DNS is working so a system would accept remote connects like ssh to further debug, although a 401/405 could also stop us receiving a further update. It's likely hard to test any further without adding some form of ostree cmd to check if an update is available and that may (or may not) be going further than we need for a basic check. |
you could just run a |
That
There are no files in
|
I'm running into this as well; I believe my first fedora-iot installation was either f34 or f35 so this configuration might be out of date. I have the following file lingering around: # cat /etc/ostree/remotes.d/fedora-iot.conf
[remote "fedora-iot"]
url=https://ostree.fedoraproject.org/iot/
gpg-verify=true
gpgkeypath=/etc/pki/rpm-gpg/
contenturl=mirrorlist=https://ostree.fedoraproject.org/iot/mirrorlist
I've tried that, to no luck (or discernable change). [root@k4 wanted.d]# rpm-ostree refresh-md
Enabled rpm-md repositories: fedora-cisco-openh264 updates fedora
Updating metadata for 'updates'... done
Importing rpm-md... done
rpm-md repo 'fedora-cisco-openh264' (cached); generated: 2023-03-14T10:56:46Z solvables: 4
rpm-md repo 'updates'; generated: 2023-09-20T01:22:56Z solvables: 20815
rpm-md repo 'fedora' (cached); generated: 2023-04-13T20:37:10Z solvables: 69222
[root@k4 wanted.d]# ls /etc/ostree/remotes.d/fedora-iot.conf
/etc/ostree/remotes.d/fedora-iot.conf
[root@k4 wanted.d]# cat /etc/ostree/remotes.d/fedora-iot.conf
[remote "fedora-iot"]
url=https://ostree.fedoraproject.org/iot/
gpg-verify=true
gpgkeypath=/etc/pki/rpm-gpg/
contenturl=mirrorlist=https://ostree.fedoraproject.org/iot/mirrorlist I'm a bit confused by what the Edit - I traced the source of the failure to the trailing slash in the url (see this comment); this can be bypassed by dropping that slash. |
FWIW my experimentation indicated that [root@k4 ~]# ostree remote show-url fedora-iot
https://ostree.fedoraproject.org/iot/
[root@k4 ~]# vi /etc/ostree/remotes.d/fedora-iot.conf # add trailing slash
[root@k4 ~]# ostree remote show-url fedora-iot
https://ostree.fedoraproject.org/iot
[root@k4 ~]# mv /etc/ostree/remotes.d/fedora-iot.conf /root
[root@k4 ~]# ostree remote show-url fedora-iot
error: Remote "fedora-iot" not found |
Yeah that's odd. I did a recursive grep over the entire file system and could not find any file with the content Anyway, I've opened #116 to use As @adrienthebo mentioned, using https://ostree.fedoraproject.org/iot (without the slash) works fine because the script already checks for 3xx responses |
An ostree remote config may have a
url=
parameter and acontenturl=
parameter included in the config. When thecontenturl=
parameter is present, the ostree client will fetch content from that resource, but will fetch metadata from the resource specified by theurl=
parameter.Currently, the Fedora IoT ostree infrastructure is configured in a way that doing
curl -L https://ostree.fedoraproject.org/iot
(as specified in theurl=
parameter) returns an HTTP 403. Butcurl -L https://ostree.fedoraproject.org/iot/config
returns HTTP 200.Along similar lines,
curl -L https://ostree.fedoraproject.org/iot/mirrorlist
returns HTTP 200. And substituting the CloudFront hostname from the mirror list:curl -L https://d2ju0wfl996cmc.cloudfront.net/config
also returns HTTP 200.The intent is to make the script more intelligent to test for actual content availability depending on how the ostree remote config is populated. If there is a
contenturl=
parameter, the script should check that fetchingconfig
asset from both theurl=
andcontenturl=
parameters to validate both more completely. In the absence of thecontenturl=
parameter, the script should only check theurl=
parameter.See also: https://issues.redhat.com/browse/THEEDGE-3108
The text was updated successfully, but these errors were encountered: