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

Test raw disk deploy fails #1201

Closed
mudler opened this issue Mar 24, 2022 · 3 comments · Fixed by rancher/elemental-cli#158 or #1205
Closed

Test raw disk deploy fails #1201

mudler opened this issue Mar 24, 2022 · 3 comments · Fixed by rancher/elemental-cli#158 or #1205
Assignees
Labels
kind/bug Something isn't working

Comments

@mudler
Copy link
Contributor

mudler commented Mar 24, 2022

Seems the test raw disk deploy started to fail recently:

• Failure [165.664 seconds]
cOS Recovery deploy tests
/Users/runner/work/cOS-toolkit/cOS-toolkit/tests/recovery-raw-disk/recovery_raw_disk_test.go:9
  after running recovery from the raw_disk image
  /Users/runner/work/cOS-toolkit/cOS-toolkit/tests/recovery-raw-disk/recovery_raw_disk_test.go:23
    uses cos-deploy to install [It]
    /Users/runner/work/cOS-toolkit/cOS-toolkit/tests/recovery-raw-disk/recovery_raw_disk_test.go:24

    Unexpected error:
        <*errors.withStack | 0xc0000b0d80>: {
            error: <*errors.withMessage | 0xc0000d92c0>{
                cause: <*ssh.ExitError | 0xc0000f1a80>{
                    Waitmsg: {status: 1, signal: "", msg: "", lang: ""},
                },
                msg: "\x1b[36mINFO\x1b[0m[2022-03-24T01:05:53Z] Starting elemental version v0.0.13           \nError: no device found\n\x1b[31mERRO\x1b[0m[2022-03-24T01:05:54Z] State partition 'COS_STATE' not found        \n",
            },
            stack: [0x12cefdd, 0x12d129a, 0x12d1280, 0x126d27a, 0x126cc45, 0x126c33b, 0x126f4a9, 0x126ee87, 0x1284e85, 0x1284ba5, 0x12843e5, 0x1286692, 0x1291ca5, 0x129196b, 0x12d0f65, 0x10dc202, 0x1069ca1],
        }
        INFO[2022-03-24T01:05:53Z] Starting elemental version v0.0.13           
        Error: no device found
        ERRO[2022-03-24T01:05:54Z] State partition 'COS_STATE' not found        
        : Process exited with status 1
    occurred

    /Users/runner/work/cOS-toolkit/cOS-toolkit/tests/recovery-raw-disk/recovery_raw_disk_test.go:28
------------------------------

Additional context

@mudler mudler added the kind/bug Something isn't working label Mar 24, 2022
@mudler mudler self-assigned this Mar 24, 2022
@mudler mudler removed their assignment Mar 24, 2022
@davidcassany
Copy link
Contributor

Found the bug. Even I can't explain it did not pop up until now. The issue is related to the partitioner or, more specific, to the yip plugin that makes use of the partitioner. I am about to fix it, the is issue is that parted does not extend the partition table if it does not match with the current device (some image got dd'ed to a bigger disk), in such case it throws an error when creating a new partition unless it is fixed before hand. This is something I missed to port on the elemental reimplementation of the plugin.

@davidcassany
Copy link
Contributor

This is uglier than what I initially thougth, it strikes back to the sgdisk vs parted. parted can't fix the GPT header to match disk size in non-interactive mode (yes, unbelievable I found references to this up to 2015 and it is still an issue). So the solution is using sgdisk only for this specific use case or alternatively assume some interaction on parted side and pipe expected input. 😞

davidcassany added a commit to rancher/elemental-cli that referenced this issue Mar 25, 2022
This commit ensure the partitioner module run 'sgdisk -e /dev/disk' to
fix GPT headers in case the disk was expanded or some smaller image was
dumped into the disk.

Fixes rancher/elemental-toolkit#1201

Signed-off-by: David Cassany <dcassany@suse.com>
@davidcassany
Copy link
Contributor

Requires the elemental bump still

@davidcassany davidcassany reopened this Mar 25, 2022
davidcassany added a commit that referenced this issue Mar 25, 2022
This commit bumps elemental client to include latest
elemental's partitioner fixes.

Fixes #1201

Signed-off-by: David Cassany <dcassany@suse.com>
@Itxaka Itxaka closed this as completed in c6d4318 Mar 25, 2022
mudler pushed a commit that referenced this issue Mar 25, 2022
This commit bumps elemental client to include latest
elemental's partitioner fixes.

Fixes #1201

Signed-off-by: David Cassany <dcassany@suse.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
2 participants