Keep config drive in swift until server deletion

Bug #1612476 reported by xiaobin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Invalid
High
xiaobin

Bug Description

Currently if configdrive_use_swift is set, config drive will be uploaded to swift with header:
{'X-Delete-After': timeout}
Which means config drive will be removed after "timeout" seconds.
If the server is rebuilt "timeout" seconds later, config drive won't be available, provisioning will fail.

Proposal:
1. Do not pass 'X-Delete-After' header
2. Delete config drive during server deletion
3. If config drive is allowed in "rebuild" call (Bug 1575935), override previous config drive.

UPD by dtantsur: we still must expire the temporary URL and generate a new one on rebuild.

xiaobin (jxiaobin)
Changed in ironic:
assignee: nobody → xiaobin (jxiaobin)
description: updated
Revision history for this message
Dmitry Tantsur (divius) wrote :

We need to fix rebuild, not keep configdrive in Swifr forever (this is a security concern).

Revision history for this message
Dmitry Tantsur (divius) wrote :

Correction: we can and should keep the configdrive in swift, but we should expire the temporary URL for it, and renew it on rebuilt.

description: updated
Dmitry Tantsur (divius)
Changed in ironic:
status: New → Triaged
importance: Undecided → High
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/355142

Changed in ironic:
status: Triaged → In Progress
xiaobin (jxiaobin)
summary: - Do not auto expire config drive in swift
+ Keep config drive in swift until server is removed
summary: - Keep config drive in swift until server is removed
+ Keep config drive in swift until server deletion
Revision history for this message
Jay Faulkner (jason-oldos) wrote :

I do not agree that the symptom described should be fixed by keeping the configdrive past server delete. For other Nova drivers, configdrive is regenerated on rebuild (https://github.com/openstack/nova/blob/0da6c6461177539cf69c7c2998f3ce8914112b0a/nova/compute/manager.py#L2576) based on user input, so that we are currently:

1) ignoring user data passed into rebuild and
2) providing different behavior than other nova drivers (by preserving configdrive contents).

I instead propose that post-deployment, we remove the configdrive from the node immediately after deployment, and rebuilding in Ironic will always require re-adding configdrive information to the node.

Revision history for this message
Mathieu Mitchell (mat128) wrote :

I agree with Jay's proposal. It is better aligned with the other drivers *and* submitting more user-data on rebuild will work.

Revision history for this message
Lucas Alvares Gomes (lucasagomes) wrote :

Thanks Jay for the comment. I also agree that would be the right way of fixing this problem.

Revision history for this message
xiaobin (jxiaobin) wrote :

True, bug 1575935 is the final fix, but it's still "Wishlist", I see no progress on it.
Once 1575935 is resolved, user data during rebuild will still be accepted.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on ironic (master)

Change abandoned by jxiaobin (<email address hidden>) on branch: master
Review: https://review.openstack.org/355142

xiaobin (jxiaobin)
Changed in ironic:
status: In Progress → Invalid
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.