Merge lp:~cprov/adt-cloud-worker/uci-nova-refix into lp:~canonical-ci-engineering/adt-cloud-worker/uci-nova

Proposed by Celso Providelo
Status: Merged
Approved by: Celso Providelo
Approved revision: 11
Merged at revision: 9
Proposed branch: lp:~cprov/adt-cloud-worker/uci-nova-refix
Merge into: lp:~canonical-ci-engineering/adt-cloud-worker/uci-nova
Diff against target: 59 lines (+9/-9)
1 file modified
uci-nova (+9/-9)
To merge this branch: bzr merge lp:~cprov/adt-cloud-worker/uci-nova-refix
Reviewer Review Type Date Requested Status
Paul Larson Approve
Francis Ginther Approve
Evan (community) Needs Fixing
Review via email: mp+256740@code.launchpad.net

Commit message

Fixing broken stderr/stdout redirect notation.

Description of the change

Fixing broken stderr/stdout redirect notation.

To post a comment you must log in.
Revision history for this message
Paul Larson (pwlars) wrote :

I'd like to hear more about what was wrong with this, perhaps a comment is in order to keep someone from trying the same thing again? +1 otherwise though

review: Approve
10. By Celso Providelo

Re-fixing uci-nova redirect notation (2>&1 instead 2&>1).

Revision history for this message
Joe Talbott (joetalbott) wrote :

looks okay to me. One in-line question.

Revision history for this message
Paul Larson (pwlars) wrote :

One question

review: Needs Information
Revision history for this message
Evan (ev) wrote :

See inline.

review: Needs Fixing
11. By Celso Providelo

Addressing review comments.

Revision history for this message
Celso Providelo (cprov) wrote :

Ev, Paul,

Thanks for catching that problem, uci-nova is fixed.

Revision history for this message
Francis Ginther (fginther) wrote :

Tested with atd-run.

review: Approve
Revision history for this message
Paul Larson (pwlars) :
review: Approve
Revision history for this message
Paul Larson (pwlars) wrote :

I'm actually still not 100% sure of the logic there, and it looks like you did something different from what Evan recommended but Francis said he was able to test it and see it work too. So, I'd like to see it land if it works, but maybe just add a quick comment about what it's doing there since there seems to be some confusion about it.

review: Approve
Revision history for this message
Celso Providelo (cprov) wrote :

Paul, diff line 55 is exactly what Ev suggested, I am missing something ?

Revision history for this message
Paul Larson (pwlars) wrote :

Nope, you're correct. I think I ended up looking at an old revision because I was viewing the comments.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'uci-nova'
--- uci-nova 2015-04-17 16:03:38 +0000
+++ uci-nova 2015-04-20 21:34:40 +0000
@@ -122,12 +122,12 @@
122}122}
123123
124security_setup_nova() {124security_setup_nova() {
125 if ! nova secgroup-create $SRVNAME "$SRVNAME testbed" >/dev/null 2&>1; then125 if ! nova secgroup-create $SRVNAME "$SRVNAME testbed" >/dev/null 2>&1; then
126 debug "Could not create specific nova security-group: $SRVNAME"126 debug "Could not create specific nova security-group: $SRVNAME"
127 exit 1127 exit 1
128 fi128 fi
129129
130 if ! nova secgroup-add-rule $SRVNAME tcp 22 22 0.0.0.0/0 >/dev/null 2&>1; then130 if ! nova secgroup-add-rule $SRVNAME tcp 22 22 0.0.0.0/0 >/dev/null 2>&1; then
131 debug "Could not allow ingress SSH."131 debug "Could not allow ingress SSH."
132 exit 1132 exit 1
133 fi133 fi
@@ -187,11 +187,11 @@
187187
188 # Setup testbed security with nova or neutron according to their188 # Setup testbed security with nova or neutron according to their
189 # availability in the target cloud.189 # availability in the target cloud.
190 if type neutron >/dev/null && neutron security-group-list; then190 if type neutron >/dev/null && neutron security-group-list >/dev/null; then
191 debug "Setting up neutron secgroup"191 debug "Setting up neutron secgroup"
192 security_setup_neutron192 security_setup_neutron
193 else193 else
194 security_setup_nova194 security_setup_nova
195 fi195 fi
196 196
197 # generate cloud-init user data; mostly for manage_etc_hosts, but also get197 # generate cloud-init user data; mostly for manage_etc_hosts, but also get
@@ -318,21 +318,21 @@
318 nova console-log $SRVNAME > $CONSOLE318 nova console-log $SRVNAME > $CONSOLE
319 fi319 fi
320320
321 if ! nova delete $SRVNAME >/dev/null >2&1; then321 if ! nova delete $SRVNAME >/dev/null 2>&1; then
322 error "Could not delete $SRVNAME instance."322 error "Could not delete $SRVNAME instance."
323 fi323 fi
324324
325 if ! nova keypair-delete $SRVNAME >2&1; then325 if ! nova keypair-delete $SRVNAME >/dev/null 2>&1; then
326 error "Could not delete $SRVNAME keypair."326 error "Could not delete $SRVNAME keypair."
327 fi327 fi
328328
329 if ! rm -rf /tmp/$SRVNAME; then329 if ! rm -rf /tmp/$SRVNAME >/dev/null 2>&1; then
330 debug "Could not delete /tmp/$SRVNAME SSH keys"330 debug "Could not delete /tmp/$SRVNAME SSH keys"
331 fi331 fi
332332
333 DELETE_CMD="neutron security-group-delete $SRVNAME"333 DELETE_CMD="neutron security-group-delete $SRVNAME"
334 if ! neutron security-group-list; then334 if ! type neutron >/dev/null || ! neutron security-group-list >/dev/null; then
335 DELETE_CMD="nova secgroup-delete $SRVNAME"335 DELETE_CMD="nova secgroup-delete $SRVNAME"
336 fi336 fi
337337
338 debug "Deleting $SRVNAME security-group"338 debug "Deleting $SRVNAME security-group"

Subscribers

People subscribed via source and target branches