Failing to install wichita (P8) - sgdisk fails to create the partition on /dev/md0

Bug #1784562 reported by Christian Ehrhardt 
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
curtin (Ubuntu)
Incomplete
Undecided
Unassigned
maas (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

Running internal power maas on http://10.245.71.3 (I think manjo can add users if you have none) fails to deploy power8 based machine wichita.

I'll file against maas and curtin as I'm not sure yet where the issue is, and add details then.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

ipmi is working, I have tracked the install and it seems "normal" until it breaks reproducible 5/5 tries now.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Here the install log from maas UI, lets look in there

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

FYI: maas is on 2.3.3 (6498-ge4db91d-0ubuntu1~16.04.1)

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
Download full text (3.2 KiB)

Hmm, look at this:
        Running command ['blkid', '-o', 'export', '/dev/sdh1'] with allowed return codes [0, 2] (capture=True)
        Writing dname udev rule '['SUBSYSTEM=="block"', 'ACTION=="add|change"', 'ENV{DEVTYPE}=="partition"', 'ENV{ID_PART_ENTRY_UUID}=="5d3e4029-081f-4dd3-b978-23714623e5a5"', 'SYMLINK+="disk/by-dname/sdh-part1"\n']'
        finish: cmd-install/stage-partitioning/builtin/cmd-block-meta: SUCCESS: configuring partition: sdh-part1
        start: cmd-install/stage-partitioning/builtin/cmd-block-meta: configuring partition: md0-part1
        get_path_to_storage_volume for volume md0
        devsync for /dev/md0
        Running command ['partprobe', '/dev/md0'] with allowed return codes [0, 1] (capture=False)
        Running command ['udevadm', 'settle'] with allowed return codes [0] (capture=False)
        devsync happy - path /dev/md0 now exists
        return volume path /dev/md0
        md0 logical_block_size_bytes: 512
        adding partition 'md0-part1' to disk 'md0' (ptable: 'gpt')
        partnum: 1 offset_sectors: 2048 length_sectors: 2231418879
        Preparing partition location on disk /dev/md0
        Wiping 1M on /dev/md0 at offset 1048576
        Running command ['sgdisk', '--new', '1:2048:2231420927', '--typecode=1:8300', '/dev/md0'] with allowed return codes [0] (capture=True)
        An error occured handling 'md0-part1': ProcessExecutionError - Unexpected error while running command.
        Command: ['sgdisk', '--new', '1:2048:2231420927', '--typecode=1:8300', '/dev/md0']
        Exit code: 4
        Reason: -
        Stdout: Creating new GPT entries.

        Stderr: Could not create partition 1 from 2048 to 2231420927
                Could not change partition 1's type code to 8300!
                Error encountered; not saving changes.

        finish: cmd-install/stage-partitioning/builtin/cmd-block-meta: FAIL: configuring partition: md0-part1
        finish: cmd-install/stage-partitioning/builtin/cmd-block-meta: FAIL: curtin command block-meta
        Traceback (most recent call last):
          File "/curtin/curtin/commands/main.py", line 201, in main
            ret = args.func(args)
          File "/curtin/curtin/commands/block_meta.py", line 58, in block_meta
            meta_custom(args)
          File "/curtin/curtin/commands/block_meta.py", line 1484, in meta_custom
            handler(command, storage_config_dict)
          File "/curtin/curtin/commands/block_meta.py", line 601, in partition_handler
            util.subp(cmd, capture=True)
          File "/curtin/curtin/util.py", line 266, in subp
            return _subp(*args, **kwargs)
          File "/curtin/curtin/util.py", line 132, in _subp
            cmd=args)
        curtin.util.ProcessExecutionError: Unexpected error while running command.
        Command: ['sgdisk', '--new', '1:2048:2231420927', '--typecode=1:8300', '/dev/md0']
        Exit code: 4
        Reason: -
        Stdout: Creating new GPT entries.

        Stderr: Could not create partition 1 from 2048 to 2231420927
                Could not change partition 1's type cod...

Read more...

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

type is "8300 Linux filesystem"
Retval 4 is "4 An error prevented saving changes"
The size is ~1TB which sounds reasonable.

I found that the log actually contains two failed sgdisk calls.
Earlier there also is:

Wiping 1M on /dev/md0 at offset 1048576W
Running command ['sgdisk', '--new', '1:2048:2231420927', '--typecode=1:8300', '/dev/md0'] with allowed return codes [0] (capture=True)R
An error occured handling 'md0-part1': ProcessExecutionError - Unexpected error while running command.A
Command: ['sgdisk', '--new', '1:2048:2231420927', '--typecode=1:8300', '/dev/md0']C
Exit code: 4E
Reason: -R
Stdout: Creating new GPT entries.S

Stderr: Could not create partition 1 from 2048 to 2231420927S
        Could not change partition 1's type code to 8300!
        Error encountered; not saving changes.

Seems pretty much the same to me.

summary: - Failing to install wichita (P8)
+ Failing to install wichita (P8) - sgdisk fails to create the partition
+ on /dev/md0
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Config in maas says:
md0-part1 1.1 TB ext4 /srv
sda-part2 1.1 TB ext4 /

I'd not need that md0, so lets kill it...

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Ok, that was it.
So we have two POVs here:

1. somebody has set up a /dev/md0 based config to screw others up deploying the system (bad luck for me and bad people not removing bad config after tests)

2. maas/curtin should be able to handle the config and get this installed
   But since I didn't create the md0 config I can't prove that it was valid.
   I'll set it to incomplete, if you can ready more from the logs and find a bug - yeah.
   Otherwise please mark it invalid.

Changed in maas (Ubuntu):
status: New → Incomplete
Changed in curtin (Ubuntu):
status: New → Incomplete
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

The remaining bug in this is a dup, closing as that.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.