using tgt-admin --conf option creates false sense of security, volume attach still fails after tgtd restart

Bug #1056246 reported by Eoghan Glynn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
High
Eoghan Glynn
OpenStack Compute (nova)
Fix Released
High
Eoghan Glynn

Bug Description

In order to avoid problems with tgtd not knowing that it should pick up iscsi target configs from /etc/cinder/volumes (formerly /var/lib/nova/volumes or /var/lib/cinder/volumes), the following commit added the --conf option to the tgt-adm command:

   https://github.com/openstack/nova/commit/0a09bf5f

However this just creates a false sense of security, as problems arise if a volume is created before a tgtd restart and then we attempt to attach afterwards (on F17, this manifests as an iscsiadm login timeout).

It would be preferable to fail fast when the tgtd config is not correct from the get-go.

This would force users to correct their /etc/tgt/targets.conf:

  sudo sed -i '1iinclude /etc/cinder/volumes/*' /etc/tgt/targets.conf

instead of volumes appearing to work and then inexplicably failing after a tgtd restart.

This fail-fast behavior would be achieved by reverting the commit mentioned above.

Eoghan Glynn (eglynn)
Changed in nova:
assignee: nobody → Eoghan Glynn (eglynn)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
status: New → In Progress
Changed in cinder:
assignee: nobody → Eoghan Glynn (eglynn)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Mark McLoughlin (markmc)
tags: added: folsom-rc-potential
tags: added: folsom-backport-potential
Changed in nova:
importance: Undecided → High
Revision history for this message
Adam Gandelman (gandelman-a) wrote :

Currently, the packaging in Ubuntu (and I believe Fedora) drop a file in /etc/tgt/conf.d/ to include the nova/cinder volume directory. Is this sufficient to avoid forcing users (read: packaging) to modify config files unrelated to nova/cinder?

Changed in cinder:
importance: Undecided → High
Revision history for this message
Eoghan Glynn (eglynn) wrote :

Adam,

I believe that the addition to /etc/tgt/conf.d/ works fine on Ubuntu, but there's an issue on Fedora whereby globbing in the conf.d config fragments is not properly expanded.

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

Fix proposed to branch: milestone-proposed
Review: https://review.openstack.org/13663

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

Fix proposed to branch: milestone-proposed
Review: https://review.openstack.org/13664

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

Reviewed: https://review.openstack.org/13633
Committed: http://github.com/openstack/cinder/commit/94c4ec8a1e68fe7a764732a65a48322c7d1cc724
Submitter: Jenkins
Branch: master

commit 94c4ec8a1e68fe7a764732a65a48322c7d1cc724
Author: Eoghan Glynn <email address hidden>
Date: Tue Sep 25 15:52:38 2012 +0100

    Revert explicit usage of tgt-adm --conf option.

    Fixes bug 1056246.

    This reverts commit 0903603971033536751ba40df98a3c39175d3189.

    This ensures that we fail-fast if the tgtd configuration does
    not include the directory for volume iscsi target configs,
    instead of only blowing up when tgtd is restarted.

    Change-Id: I30aa3f1d8944eb33cd4a42d65e227031023406b4

Changed in cinder:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/13632
Committed: http://github.com/openstack/nova/commit/3f85c9b381670fbe1086e0aca862d8868dee25e2
Submitter: Jenkins
Branch: master

commit 3f85c9b381670fbe1086e0aca862d8868dee25e2
Author: Eoghan Glynn <email address hidden>
Date: Tue Sep 25 15:31:58 2012 +0100

    Revert explicit usage of tgt-adm --conf option.

    Fixes bug 1056246.

    Reverts commit 0a09bf5faeb30b675fdb8f517c61166ef794bad3.

    This ensures that we fail-fast if the tgtd configuration does
    not include the directory for volume iscsi target configs,
    instead of only blowing up when tgtd is restarted.

    Change-Id: I3c9f0d97e411560e5c0fd058671f8c834e9bed1e

Changed in nova:
status: In Progress → Fix Committed
Changed in cinder:
milestone: none → folsom-rc3
Changed in nova:
milestone: none → folsom-rc3
tags: removed: folsom-backport-potential folsom-rc-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (milestone-proposed)

Reviewed: https://review.openstack.org/13663
Committed: http://github.com/openstack/cinder/commit/f8035365288904bef42e6cf7fcd7f914db122b90
Submitter: Jenkins
Branch: milestone-proposed

commit f8035365288904bef42e6cf7fcd7f914db122b90
Author: Eoghan Glynn <email address hidden>
Date: Tue Sep 25 15:52:38 2012 +0100

    Revert explicit usage of tgt-adm --conf option.

    Fixes bug 1056246.

    This reverts commit 0903603971033536751ba40df98a3c39175d3189.

    This ensures that we fail-fast if the tgtd configuration does
    not include the directory for volume iscsi target configs,
    instead of only blowing up when tgtd is restarted.

    Change-Id: I30aa3f1d8944eb33cd4a42d65e227031023406b4

Changed in cinder:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (milestone-proposed)

Reviewed: https://review.openstack.org/13664
Committed: http://github.com/openstack/nova/commit/53a598fed2c0c9bbf7d9b868433d4447c57f1012
Submitter: Jenkins
Branch: milestone-proposed

commit 53a598fed2c0c9bbf7d9b868433d4447c57f1012
Author: Eoghan Glynn <email address hidden>
Date: Tue Sep 25 15:31:58 2012 +0100

    Revert explicit usage of tgt-adm --conf option.

    Fixes bug 1056246.

    Reverts commit 0a09bf5faeb30b675fdb8f517c61166ef794bad3.

    This ensures that we fail-fast if the tgtd configuration does
    not include the directory for volume iscsi target configs,
    instead of only blowing up when tgtd is restarted.

    Change-Id: I3c9f0d97e411560e5c0fd058671f8c834e9bed1e

Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: folsom-rc3 → 2012.2
Thierry Carrez (ttx)
Changed in nova:
milestone: folsom-rc3 → 2012.2
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.