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

fix(livenet): some fixes related to getting live image size #2611

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

aafeijoo-suse
Copy link
Member

Some fixes related to getting live image size.

Checklist

  • I have tested it locally
  • I have reviewed and updated any documentation if relevant
  • I am providing new code and test(s) for it

Some servers send `content-length` instead of `Content-Length`, so ignore the
case. E.g.:

```
> curl -sIL https://pkg.adfinis.com/opensuse/tumbleweed/iso/openSUSE-Tumbleweed-DVD-x86_64-Snapshot20240118-Media.iso
HTTP/2 200
server: nginx
date: Fri, 19 Jan 2024 16:29:54 GMT
content-type: application/octet-stream
content-length: 4643094528
last-modified: Fri, 19 Jan 2024 03:34:00 GMT
etag: "65a9eda8-114c00000"
accept-ranges: bytes
```
…essage

If `curl` fails to reach the URL of the live image, or if the header received
does not provide `Content-Length`, the error message displayed is misleading.

```
[    8.118432] dracut-initqueue[800]: /usr/sbin/livenetroot: line 21: / (1024 * 1024): syntax error: operand expected (error token is "/ (1024 * 1024)")
```

Therefore, split the calculation and provide proper error messages.

Reported-by: Knut Anderssen <[email protected]>
@aafeijoo-suse
Copy link
Member Author

CC @tblume

@github-actions github-actions bot added modules Issue tracker for all modules livenet Issues related to the livenet module labels Jan 19, 2024
@tblume
Copy link
Collaborator

tblume commented Jan 22, 2024

CC @tblume

LGTM

Copy link

stale bot commented Mar 13, 2024

This issue is being marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. If this is still an issue in the latest release of Dracut and you would like to keep it open please comment on this issue within the next 7 days. Thank you for your contributions.

@stale stale bot added the stale communication is stuck label Mar 13, 2024
@aafeijoo-suse aafeijoo-suse removed the stale communication is stuck label Mar 14, 2024
Copy link

stale bot commented Apr 22, 2024

This issue is being marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. If this is still an issue in the latest release of Dracut and you would like to keep it open please comment on this issue within the next 7 days. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
livenet Issues related to the livenet module modules Issue tracker for all modules stale communication is stuck
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants