MAAS fails to deploy on a system with 4Kn (4096-byte native sector size) disk

Bug #1561659 reported by Rod Smith
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MAAS
Incomplete
Undecided
Unassigned
1.9
Incomplete
Undecided
Unassigned

Bug Description

In testing a node with a 4Kn (4096-byte physical AND logical sector size) disk, MAAS fails to deploy the node. The "machine output" is as follows:

Creating new GPT entries.
Could not create partition 1 from 133120 to 15628051120
Could not change partition 1's type code to 8300!
Error encountered; not saving changes.
failed to sgdisk for uefi to /dev/sda
Unexpected error while running command.
Command: ['partition', '--format=uefi', '/dev/sda']
Exit code: 1
Reason: -
Stdout: ''
Stderr: ''
Installation failed with exception: Unexpected error while running command.
Command: ['curtin', 'block-meta', 'simple']
Exit code: 3
Reason: -
Stdout: "Creating new GPT entries.\nCould not create partition 1 from 133120 to 15628051120\nCould not change partition 1's type code to 8300!\nError encountered; not saving changes.\nfailed to sgdisk for uefi to /dev/sda\nUnexpected error while running command.\nCommand: ['partition', '--format=uefi', '/dev/sda']\nExit code: 1\nReason: -\nStdout: ''\nStderr: ''\n"
Stderr: ''

The disk in question is an ~8TB HGST 0F23666, which is ~1,953,125,000 sectors; however, the preceding output shows that MAAS is attempting to create a partition that ends at sector 15,628,051,120 -- eight times the size of the disk. In other words, it appears that MAAS includes an assumption of 512-byte sectors somewhere in its code.

We can provide access to the disk in the Certification lab in Lexington.

$ dpkg -l '*maas*'|cat
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=====================================================-===================================================-============-===============================================================================
ii maas 1.9.0+bzr4533-0ubuntu1~trusty1 all MAAS server all-in-one metapackage
ii maas-cert-server 0.2.13-0~48~ubuntu14.04.1 all Ubuntu certification support files for MAAS server
ii maas-cli 1.9.0+bzr4533-0ubuntu1~trusty1 all MAAS command line API tool
ii maas-cluster-controller 1.9.0+bzr4533-0ubuntu1~trusty1 all MAAS server cluster controller
ii maas-common 1.9.0+bzr4533-0ubuntu1~trusty1 all MAAS server common files
ii maas-dhcp 1.9.0+bzr4533-0ubuntu1~trusty1 all MAAS DHCP server
ii maas-dns 1.9.0+bzr4533-0ubuntu1~trusty1 all MAAS DNS server
ii maas-proxy 1.9.0+bzr4533-0ubuntu1~trusty1 all MAAS Caching Proxy
ii maas-region-controller 1.9.0+bzr4533-0ubuntu1~trusty1 all MAAS server complete region controller
ii maas-region-controller-min 1.9.0+bzr4533-0ubuntu1~trusty1 all MAAS Server minimum region controller
ii python-django-maas 1.9.0+bzr4533-0ubuntu1~trusty1 all MAAS server Django web framework
ii python-maas-client 1.9.0+bzr4533-0ubuntu1~trusty1 all MAAS python API client
ii python-maas-provisioningserver 1.9.0+bzr4533-0ubuntu1~trusty1 all MAAS server provisioning libraries

Revision history for this message
Rod Smith (rodsmith) wrote :
Revision history for this message
Andres Rodriguez (andreserl) wrote :

Hi rod, please get the curting config using MAAS's CLI and attach it to the bug!

Thanks

Revision history for this message
Andres Rodriguez (andreserl) wrote :

Also, 1.9.1 has already been released and I see you are using 1.9.0. I don't think this would make a difference but 1.9.1 should be used instead.

Revision history for this message
Andres Rodriguez (andreserl) wrote :

Also, i'd be ideal to make sure this also affects 2.0

Changed in maas:
milestone: none → 1.9.2
milestone: 1.9.2 → 2.0.0
Revision history for this message
Rod Smith (rodsmith) wrote :

Andres, I'm updating to MAAS 1.9.1 now and will try another deployment. What sort of curtin config do you want? (What command(s) should I issue?)

Revision history for this message
Rod Smith (rodsmith) wrote :

I've updated to MAAS 1.9.1 and tried again with the same results. Also, I tried both a standard Ubuntu 14.04 deployment and via the "Custom" option and a certification point-release image, with the same results. Here's the new version information:

$ dpkg -l '*maas*'|cat
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=====================================================-===================================================-============-===============================================================================
ii maas 1.9.1+bzr4543-0ubuntu1~trusty1 all MAAS server all-in-one metapackage
ii maas-cert-server 0.2.13-0~48~ubuntu14.04.1 all Ubuntu certification support files for MAAS server
ii maas-cli 1.9.1+bzr4543-0ubuntu1~trusty1 all MAAS command line API tool
ii maas-cluster-controller 1.9.1+bzr4543-0ubuntu1~trusty1 all MAAS server cluster controller
ii maas-common 1.9.1+bzr4543-0ubuntu1~trusty1 all MAAS server common files
ii maas-dhcp 1.9.1+bzr4543-0ubuntu1~trusty1 all MAAS DHCP server
ii maas-dns 1.9.1+bzr4543-0ubuntu1~trusty1 all MAAS DNS server
ii maas-proxy 1.9.1+bzr4543-0ubuntu1~trusty1 all MAAS Caching Proxy
ii maas-region-controller 1.9.1+bzr4543-0ubuntu1~trusty1 all MAAS server complete region controller
ii maas-region-controller-min 1.9.1+bzr4543-0ubuntu1~trusty1 all MAAS Server minimum region controller
ii python-django-maas 1.9.1+bzr4543-0ubuntu1~trusty1 all MAAS server Django web framework
ii python-maas-client 1.9.1+bzr4543-0ubuntu1~trusty1 all MAAS python API client
ii python-maas-provisioningserver 1.9.1+bzr4543-0ubuntu1~trusty1 all MAAS server provisioning libraries

Revision history for this message
Blake Rouse (blake-rouse) wrote :

Please provide the output of "maas SESSION block-devices read NODE_ID".

MAAS does get the block size from the disk when it commissions. Its either MAAS is getting the wrong value or MAAS is not using the gathered value correctly.

Changed in maas:
status: New → Incomplete
Revision history for this message
Rod Smith (rodsmith) wrote :

Blake, are you sure that's the right command? I get an error:

$ maas admin block-devices read 42fdd3da-f1dd-11e5-ab31-888888888788
usage: /usr/lib/python2.7/dist-packages/maascli/__main__.py admin
       [-h] COMMAND ...

Issue commands to the MAAS region controller at http://10.20.30.1/MAAS/api/1.0/.
...

...and then lots more "help."

Revision history for this message
Rod Smith (rodsmith) wrote :

Will this do instead?

maas admin node details node-42fdd3da-f1dd-11e5-ab31-888888888788

Revision history for this message
Blake Rouse (blake-rouse) wrote :

No details is not the same data as the block-devices read.

"block-devices read" is the correct command just tested it on my system. Try "maas refresh" to make sure your cli has the latest information.

Revision history for this message
Rod Smith (rodsmith) wrote :

OK, that did it. Here you go....

$ maas admin block-devices read node-42fdd3da-f1dd-11e5-ab31-888888888788

Revision history for this message
Blake Rouse (blake-rouse) wrote :

Its showing:

"block_size": 4096

Correct for the disk?

Revision history for this message
Rod Smith (rodsmith) wrote :

Yes, both the physical and logical block size is 4096 bytes.

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

Other bug subscribers

Remote bug watches

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