2014-12-26 15:21:11 |
Vladyslav Drok |
description |
Suppose you have a deployed node and you want to change one of its images in instance_info - kernel, ramdisk, image_source; or you may want to change the driver from pxe_ipmitool to agent_ipmitool and because of that you have to change deploy_kernel and deploy_ramdisk in driver_info.
After changing it in node's instance_info or driver_info in conductor log it can be seen that new images are downloaded to image cache, but files in /opt/stack/data/ironic/tftpboot/<node-uuid>/ or /var/lib/ironic/images/<node-uuid> are still hard linked to old values.
It happens because of this part of code: https://github.com/openstack/ironic/blob/master/ironic/drivers/modules/image_cache.py#L153-L160 , where OSErrors are just ignored if they happen when hard link is created. OSError appears if you try to do e.g. os.link('aaa', 'bbb') and file 'bbb' already exists. |
Suppose you have a deployed node and you want to change image_source's kernel or ramdisk; or you may want to change the driver from pxe_ipmitool to agent_ipmitool and because of that you have to change deploy_kernel and deploy_ramdisk in driver_info.
After changing it in node's instance_info or driver_info in conductor log it can be seen that new images are downloaded to image cache, but files in /opt/stack/data/ironic/tftpboot/<node-uuid>/ or /var/lib/ironic/images/<node-uuid> are still hard linked to old values.
It happens because of this part of code: https://github.com/openstack/ironic/blob/master/ironic/drivers/modules/image_cache.py#L109-L114 , where nothing is done if the path image should be downloaded to exists. This path is <pxe-root-dir>/<node-uuid>/<label>, where <label> can be deploy_kernel, deploy_ramdisk, kernel, ramdisk. |
|
2014-12-26 16:04:18 |
Vladyslav Drok |
description |
Suppose you have a deployed node and you want to change image_source's kernel or ramdisk; or you may want to change the driver from pxe_ipmitool to agent_ipmitool and because of that you have to change deploy_kernel and deploy_ramdisk in driver_info.
After changing it in node's instance_info or driver_info in conductor log it can be seen that new images are downloaded to image cache, but files in /opt/stack/data/ironic/tftpboot/<node-uuid>/ or /var/lib/ironic/images/<node-uuid> are still hard linked to old values.
It happens because of this part of code: https://github.com/openstack/ironic/blob/master/ironic/drivers/modules/image_cache.py#L109-L114 , where nothing is done if the path image should be downloaded to exists. This path is <pxe-root-dir>/<node-uuid>/<label>, where <label> can be deploy_kernel, deploy_ramdisk, kernel, ramdisk. |
Suppose you have a deployed node and you want to change image_source's kernel or ramdisk; or you may want to change the driver from pxe_ipmitool to agent_ipmitool and because of that you have to change deploy_kernel and deploy_ramdisk in driver_info.
After changing it in node's instance_info or driver_info in conductor log you can see the following lines:
DEBUG ironic.drivers.modules.image_cache [-] Destination /opt/stack/data/ironic/tftpboot/5189df61-abd0-498d-b1c5-1bba22d33376/deploy_ramdisk already exists for image 07a8020a-6a4e-4480-b968-0eba1c3a0a85
and deploy_ramdisk is not updated in folder with node's images.
It happens when during rebuild from active provision state because of this part of code: https://github.com/openstack/ironic/blob/master/ironic/drivers/modules/image_cache.py#L109-L114 , where nothing is done if the path image should be downloaded to exists. This path is <pxe-root-dir>/<node-uuid>/<label>, where <label> can be deploy_kernel, deploy_ramdisk, kernel, ramdisk. |
|