Upgrade of ironic sets ports pxe_enabled field to null

Bug #1545068 reported by Ricardo Carrillo Cruz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
High
Jim Rollenhagen

Bug Description

Hi there

I just upgraded Ironic on my bifrost server and was getting the following deployment failure:

<snip>
TASK [bifrost-deploy-nodes-dynamic : Deploy to hardware - bifrost default] *****
task path: /opt/stack/bifrost/playbooks/roles/bifrost-deploy-nodes-dynamic/tasks/main.yml:69
ESTABLISH LOCAL CONNECTION FOR USER: stack
localhost EXEC ( umask 22 && mkdir -p "$( echo $HOME/.ansible/tmp/ansible-tmp-1455293783.67-273172620574949 )" && echo "$( echo $HOME/.ansible/tmp/ansible-tmp-1455293783.67-273172620574949 )" )
localhost PUT /tmp/tmpArAcDX TO /home/stack/.ansible/tmp/ansible-tmp-1455293783.67-273172620574949/os_ironic_node
localhost EXEC LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /home/stack/.ansible/tmp/ansible-tmp-1455293783.67-273172620574949/os_ironic_node; rm -rf "/home/stack/.ansible/tmp/ansible-tmp-1455293783.67-273172620574949/" > /dev/null 2>&1
fatal: [compute031.hpuseast.ic.openstack.org -> localhost]: FAILED! => {"changed": false, "failed": true, "invocation": {"module_args": {"api_timeout": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "auth": {"endpoint": "http://localhost:6385/"}, "auth_type": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "availability_zone": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "cacert": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "cert": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "cloud": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "config_drive": "http://10.23.212.3:8080/configdrive-34313036-3630-5355-4532-333644464a35.iso.gz", "deploy": true, "endpoint_type": "public", "instance_info": {"image_checksum": "9a2349059ecddc47fd2baeaa846a1a68", "image_disk_format": "qcow2", "image_source": "http://10.23.212.3:8080/deployment_image.qcow2", "root_gb": 10}, "ironic_url": "http://localhost:6385/", "key": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "maintenance": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "maintenance_reason": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "name": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "power": "present", "region_name": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "state": "present", "timeout": 180, "uuid": "34313036-3630-5355-4532-333644464a35", "verify": true, "wait": true}, "module_name": "os_ironic_node"}, "msg": "Field `pxe_enabled' cannot be ******** (HTTP 500)"}
</snip>

Running a simple port list would show the same problem:

<snip>
stack@baremetal00:/opt/stack/bifrost$ ironic port-list
Field `pxe_enabled' cannot be None (HTTP 500)
</snip>

Running DML 'sudo mysql ironic -e "update ports set pxe_enabled=TRUE"' fixed the issue.
I assume the real fix should be put in the DB migration scripts, making sure the pxe_enabled field is non null.

Regards

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (master)

Fix proposed to branch: master
Review: https://review.openstack.org/279663

Changed in ironic:
assignee: nobody → Jim Rollenhagen (jim-rollenhagen)
status: New → In Progress
Changed in ironic:
assignee: Jim Rollenhagen (jim-rollenhagen) → Vladyslav Drok (vdrok)
Vladyslav Drok (vdrok)
Changed in ironic:
assignee: Vladyslav Drok (vdrok) → Jim Rollenhagen (jim-rollenhagen)
Changed in ironic:
assignee: Jim Rollenhagen (jim-rollenhagen) → Vladyslav Drok (vdrok)
Vladyslav Drok (vdrok)
Changed in ironic:
assignee: Vladyslav Drok (vdrok) → Jim Rollenhagen (jim-rollenhagen)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.openstack.org/279663
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=c53a649b24f5ff4d0370f4548bc4907871561e1a
Submitter: Jenkins
Branch: master

commit c53a649b24f5ff4d0370f4548bc4907871561e1a
Author: Jim Rollenhagen <email address hidden>
Date: Fri Feb 12 16:55:38 2016 +0000

    Set existing ports pxe_enabled=True when adding pxe_enabled column

    The `default` parameter to Column() doesn't have any effect on existing
    rows, therefore when this migration runs it is set to NULL. After adding
    the column, update existing ports in the database to have
    pxe_enabled=True, which maintains behavior before this column was added.

    Closes-Bug: #1545068
    Change-Id: Ibee65fbe26d89d27925a2202795d38461ec60f1f

Changed in ironic:
status: In Progress → Fix Released
Dmitry Tantsur (divius)
Changed in ironic:
importance: Undecided → High
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/ironic 5.0.0

This issue was fixed in the openstack/ironic 5.0.0 release.

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.