Deploying ramdisk instances with Ironic 2023.1 failed - image_source
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bifrost |
Expired
|
Undecided
|
Unassigned |
Bug Description
deploying instances with a Ramdisk failed:
Ironic Bifrost version stable/2023.1
https:/
[DEFAULT]
...
enabled_
$vmbc with libvirt is used for development purposes:
$sudo /opt/virtualbmc
$disk-image-create -o ~/output/ramdisk debian-minimal ironic-ramdisk-base openssh-server dhcp-all-interfaces
$source /opt/stack/
$export OS_CLOUD=bifrost
~/bifrost/
diskless-test:
driver: ipmi
driver_info:
ipmi_address: "127.0.0.1"
ipmi_port: "6231"
ipmi_password: "test"
ipmi_username: "test"
ipv4_address: 192.168.103.101
ipv4_gateway: 192.168.103.254
ipv4_subnet_mask: 255.255.255.0
network_mtu: 1500
name: diskless-test
nics:
- mac: 52:54:00:e6:20:55
properties:
cpu_arch: x86_64
uuid: 00000000-
instance-info:
kernel: http://
ramdisk: http://
$baremetal node set diskless --instance-info kernel=http://
$ baremetal node deploy diskless
Failed to validate deploy or power info for node 00000000-
Even if:
Before the Xena release, the image_source field was also required:
--instance-info image_source=http://
/var/log/syslog:Aug 5 11:18:57 ironic01 ironic[123909]: 2023-08-05 11:18:57.073 123909 DEBUG ironic.api.method [None req-a4011e4c-
If we provide image_source=http://
So the error will be:
$ baremetal node set diskless --instance-info kernel=http://
(bifrost) ubuntu@
Failed to validate deploy or power info for node 00000000-
If we provide image_checksum:
baremetal node set diskless --instance-info kernel=http://
$ baremetal node deploy diskless
$ baremetal node list
+------
| UUID | Name | Instance UUID | Power State | Provisioning State | Maintenance |
+------
| 00000000-
+------
| instance_info | {'kernel': 'http://
| instance_uuid | None |
| last_error | Failed to prepare to deploy: Some parameters were missing in node's instance_info. Missing are: ['root_gb']
However we understand that there is no any disks because the server is diskless
If we provide root_gb manually:
$ baremetal node set diskless --instance-info kernel=http://
$ baremetal node list
+------
| UUID | Name | Instance UUID | Power State | Provisioning State | Maintenance |
+------
| 00000000-
+------
| instance_info | {'kernel': 'http://
| instance_uuid | None |
| last_error | Deploy step deploy.
| | Command: mount /dev/vda2 /tmp/tmpa57e_eko |
| | Exit code: 32 |
| | Stdout: '' |
| | Stderr: 'mount: /tmp/tmpa57e_eko: wrong fs type, bad option, bad superblock on /dev/vda2, missing codepage or helper program, or other error.\n'.
The logic seems broken in 2023.1 Ironic booting with a ramdrive
Traceback:
ERROR ironic. conductor. utils KeyError: 'image_source'
ERROR ironic. conductor. utils [None req-406c6af0- b596-4c0f- 9a66-12ffbf581f 56 bifrost_user - - - - -] Node 00000000- 0000-0000- 0000-2000000000 04> conductor. utils Traceback (most recent call last): conductor. utils File "/opt/stack/ bifrost/ lib/python3. 10/site- packages/ ironic/ conductor/ deployments. py", line 276, in do_next_d> conductor. utils result = interface. execute_ deploy_ step(task, step) conductor. utils File "/opt/stack/ bifrost/ lib/python3. 10/site- packages/ ironic/ drivers/ base.py" , line 376, in execute_deploy_step conductor. utils return self._execute_ step(task, step) conductor. utils File "/opt/stack/ bifrost/ lib/python3. 10/site- packages/ ironic/ drivers/ base.py" , line 299, in _execute_step conductor. utils return getattr(self, step['step'])(task) conductor. utils File "/opt/stack/ bifrost/ lib/python3. 10/site- packages/ ironic_ lib/metrics. py", line 60, in wrapped conductor. utils result = f(*args, **kwargs) conductor. utils File "/opt/stack/ bifrost/ lib/python3. 10/site- packages/ ironic/ conductor/ task_manager. py", line 153, in wrapper conductor. utils return f(*args, **kwargs) conductor. utils File "/opt/stack/ bifrost/ lib/python3. 10/site- packages/ ironic/ drivers/ modules/ ramdisk. py", line 76, in deploy conductor. utils task.driver. boot.prepare_ instance( task) conductor. utils File "/opt/stack/ bifrost/ lib/python3. 10/site- packages/ ironic_ lib/metrics. py", line 60, in wrapped conductor. utils result = f(*args, **kwargs) conductor. utils File "/opt/stack/ bifrost/ lib/python3. 10/site- packages/ ironic/ drivers/ modules/ pxe_base. py", line 242, in prepar> conductor. utils instance_image_info = pxe_utils. get_instance_ image_info( conductor. utils File "/opt/stack/ bifrost/ lib/python3. 10/site- packages/ ironic/ common/ pxe_utils. py", line 736, in get_instance_i> conductor. utils _get_image_ properties( ) conductor. utils File "/opt/stack/ bifrost/ lib/python3. 10/site- packages/ ironic/ common/ pxe_utils. py", line 689, in _get_image_pro> conductor. utils d_info[ 'image_ source' ], conductor. utils KeyError: 'image_source' conductor. utils common. pxe_utils [None req-406c6af0- b596-4c0f- 9a66-12ffbf581f 56 bifrost_user - - - - -] Cleaning up PXE config for node 00000000> drivers. modules. boot_mode_ utils [None req-406c6af0- b596-4c0f- 9a66-12ffbf581f 56 bifrost_user - - - - -] Deploy boot mode is uefi > drivers. modules. image_cache [None req-406c6af0- b596-4c0f- 9a66-12ffbf581f 56 bifrost_user - - - - -] Starting clean up for master > conductor. utils [None req-406c6af0- b596-4c0f- 9a66-12ffbf581f 56 bifrost_user - - - - -] Cleanup failed for node 00000000-0000-000> conductor. utils Traceback (most recent call last): conductor. utils File "/opt/stack/ bifrost/ lib/python3. 10/site- packages/ ironic/ conductor/ deployments. py", line 276,...
ERROR ironic.
ERROR ironic.
ERROR ironic.
ERROR ironic.
ERROR ironic.
ERROR ironic.
ERROR ironic.
ERROR ironic.
ERROR ironic.
ERROR ironic.
ERROR ironic.
ERROR ironic.
ERROR ironic.
ERROR ironic.
ERROR ironic.
ERROR ironic.
ERROR ironic.
ERROR ironic.
ERROR ironic.
ERROR ironic.
ERROR ironic.
ERROR ironic.
ERROR ironic.
DEBUG ironic.
DEBUG ironic.
DEBUG ironic.
ERROR ironic.
ERROR ironic.
ERROR ironic.