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

[RFC] Ignore harmless error #126

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

glance-
Copy link
Contributor

@glance- glance- commented Oct 4, 2024

I run lvm with pv's on un-partitioned disks.

Unless I ignore this error code here, the searching for labels fails setup-storage.

With this it works as expected, but it's not all that pretty.

The whole error handling from FAI::execute_ro_command is sort of sus, because the error handleing happens directly in that function, so when it detects a warning, it should just warn, and ignore the result.

With this I get:
(CMD) parted -sm /dev/sdb unit B print 1> /tmp/SY_fQFB0P0 2> /tmp/QOgCOzFBVU Executing: parted -sm /dev/sdb unit B print
(STDERR) Error: /dev/sdb: unrecognised disk label
(STDOUT) BYT;
(STDOUT) /dev/sdb:4096805658624B:scsi:512:512:unknown:ATA Samsung SSD 860:; Ignoring error parted_3_2

And the relevant information can be parsed from that.

I run lvm with pv's on un-partitioned disks.

Unless I ignore this error code here, the searching for labels fails
setup-storage.

With this it works as expected, but it's not all that pretty.

The whole error handling from FAI::execute_ro_command is sort of sus,
because the error handleing happens directly in that function, so when
it detects a warning, it should just warn, and ignore the result.

With this I get:
(CMD) parted -sm /dev/sdb unit B print 1> /tmp/SY_fQFB0P0 2> /tmp/QOgCOzFBVU
Executing: parted -sm /dev/sdb unit B print
(STDERR) Error: /dev/sdb: unrecognised disk label
(STDOUT) BYT;
(STDOUT) /dev/sdb:4096805658624B:scsi:512:512:unknown:ATA Samsung SSD 860:;
Ignoring error parted_3_2

And the relevant information can be parsed from that.
@glance- glance- marked this pull request as draft October 4, 2024 13:24
@glance-
Copy link
Contributor Author

glance- commented Oct 4, 2024

This is more of a case showing the issue rather then a final solution to the problem. I guess most (all?) returned errors from FAI::execute_ro_command can be just ignored.

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.

1 participant