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
1=== modified file 'uci-nova'
2--- uci-nova 2015-04-17 16:03:38 +0000
3+++ uci-nova 2015-04-20 21:34:40 +0000
4@@ -122,12 +122,12 @@
5 }
6
7 security_setup_nova() {
8- if ! nova secgroup-create $SRVNAME "$SRVNAME testbed" >/dev/null 2&>1; then
9+ if ! nova secgroup-create $SRVNAME "$SRVNAME testbed" >/dev/null 2>&1; then
10 debug "Could not create specific nova security-group: $SRVNAME"
11 exit 1
12 fi
13
14- if ! nova secgroup-add-rule $SRVNAME tcp 22 22 0.0.0.0/0 >/dev/null 2&>1; then
15+ if ! nova secgroup-add-rule $SRVNAME tcp 22 22 0.0.0.0/0 >/dev/null 2>&1; then
16 debug "Could not allow ingress SSH."
17 exit 1
18 fi
19@@ -187,11 +187,11 @@
20
21 # Setup testbed security with nova or neutron according to their
22 # availability in the target cloud.
23- if type neutron >/dev/null && neutron security-group-list; then
24+ if type neutron >/dev/null && neutron security-group-list >/dev/null; then
25 debug "Setting up neutron secgroup"
26 security_setup_neutron
27 else
28- security_setup_nova
29+ security_setup_nova
30 fi
31
32 # generate cloud-init user data; mostly for manage_etc_hosts, but also get
33@@ -318,21 +318,21 @@
34 nova console-log $SRVNAME > $CONSOLE
35 fi
36
37- if ! nova delete $SRVNAME >/dev/null >2&1; then
38+ if ! nova delete $SRVNAME >/dev/null 2>&1; then
39 error "Could not delete $SRVNAME instance."
40 fi
41
42- if ! nova keypair-delete $SRVNAME >2&1; then
43+ if ! nova keypair-delete $SRVNAME >/dev/null 2>&1; then
44 error "Could not delete $SRVNAME keypair."
45 fi
46
47- if ! rm -rf /tmp/$SRVNAME; then
48+ if ! rm -rf /tmp/$SRVNAME >/dev/null 2>&1; then
49 debug "Could not delete /tmp/$SRVNAME SSH keys"
50 fi
51
52 DELETE_CMD="neutron security-group-delete $SRVNAME"
53- if ! neutron security-group-list; then
54- DELETE_CMD="nova secgroup-delete $SRVNAME"
55+ if ! type neutron >/dev/null || ! neutron security-group-list >/dev/null; then
56+ DELETE_CMD="nova secgroup-delete $SRVNAME"
57 fi
58
59 debug "Deleting $SRVNAME security-group"

Subscribers

People subscribed via source and target branches