Merge lp:~gnuoy/charms/trusty/nova-cloud-controller/lp1500589 into lp:~openstack-charmers-archive/charms/trusty/nova-cloud-controller/next

Proposed by Liam Young
Status: Merged
Merged at revision: 198
Proposed branch: lp:~gnuoy/charms/trusty/nova-cloud-controller/lp1500589
Merge into: lp:~openstack-charmers-archive/charms/trusty/nova-cloud-controller/next
Diff against target: 43 lines (+18/-1)
2 files modified
hooks/nova_cc_utils.py (+8/-1)
unit_tests/test_nova_cc_utils.py (+10/-0)
To merge this branch: bzr merge lp:~gnuoy/charms/trusty/nova-cloud-controller/lp1500589
Reviewer Review Type Date Requested Status
Edward Hope-Morley Approve
Review via email: mp+273508@code.launchpad.net
To post a comment you must log in.
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #11384 nova-cloud-controller-next for gnuoy mp273508
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/11384/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #10576 nova-cloud-controller-next for gnuoy mp273508
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/10576/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #7130 nova-cloud-controller-next for gnuoy mp273508
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
make: *** [test] Error 1
ERROR:root:Make target returned non-zero.

Full amulet test output: http://paste.ubuntu.com/12696559/
Build: http://10.245.162.77:8080/job/charm_amulet_test/7130/

199. By Liam Young

Fix type in length check. If all is well the cmd should return two lines

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #11385 nova-cloud-controller-next for gnuoy mp273508
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/11385/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #10577 nova-cloud-controller-next for gnuoy mp273508
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/10577/

200. By Liam Young

Kick osci

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #11387 nova-cloud-controller-next for gnuoy mp273508
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/11387/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #10579 nova-cloud-controller-next for gnuoy mp273508
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/10579/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #7132 nova-cloud-controller-next for gnuoy mp273508
    AMULET OK: passed

Build: http://10.245.162.77:8080/job/charm_amulet_test/7132/

201. By Liam Young

Updated after mp review from hopem

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #11391 nova-cloud-controller-next for gnuoy mp273508
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/11391/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #10583 nova-cloud-controller-next for gnuoy mp273508
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/10583/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #7134 nova-cloud-controller-next for gnuoy mp273508
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
make: *** [test] Error 1
ERROR:root:Make target returned non-zero.

Full amulet test output: http://paste.ubuntu.com/12697897/
Build: http://10.245.162.77:8080/job/charm_amulet_test/7134/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #7138 nova-cloud-controller-next for gnuoy mp273508
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
make: *** [test] Error 1
ERROR:root:Make target returned non-zero.

Full amulet test output: http://paste.ubuntu.com/12698646/
Build: http://10.245.162.77:8080/job/charm_amulet_test/7138/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #7175 nova-cloud-controller-next for gnuoy mp273508
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
make: *** [test] Error 1
ERROR:root:Make target returned non-zero.

Full amulet test output: http://paste.ubuntu.com/12702675/
Build: http://10.245.162.77:8080/job/charm_amulet_test/7175/

Revision history for this message
Edward Hope-Morley (hopem) wrote :

lgtm +1

review: Approve
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #7183 nova-cloud-controller-next for gnuoy mp273508
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
make: *** [test] Error 1
ERROR:root:Make target returned non-zero.

Full amulet test output: http://paste.ubuntu.com/12705556/
Build: http://10.245.162.77:8080/job/charm_amulet_test/7183/

Revision history for this message
Ryan Beisner (1chb1n) wrote :

FYI, unrelated to the changes proposed here...

https://bugs.launchpad.net/charms/+source/nova-cloud-controller/+bug/1503701

While the undercloud has elevated load, there is this race where the amulet test blindly says "create an instance right now," and the overcloud isn't quite ready for that at that moment.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'hooks/nova_cc_utils.py'
--- hooks/nova_cc_utils.py 2015-10-02 12:05:06 +0000
+++ hooks/nova_cc_utils.py 2015-10-06 15:50:49 +0000
@@ -728,10 +728,17 @@
728 # The first line of output is like '# Host xx found: line 1 type RSA',728 # The first line of output is like '# Host xx found: line 1 type RSA',
729 # which should be excluded.729 # which should be excluded.
730 output = subprocess.check_output(cmd).strip()730 output = subprocess.check_output(cmd).strip()
731 return output.split('\n')[1]
732 except subprocess.CalledProcessError:731 except subprocess.CalledProcessError:
733 return None732 return None
734733
734 if output:
735 # Bug #1500589 cmd has 0 rc on precise if entry not present
736 lines = output.split('\n')
737 if len(lines) > 1:
738 return lines[1]
739
740 return None
741
735742
736def remove_known_host(host, unit=None, user=None):743def remove_known_host(host, unit=None, user=None):
737 log('Removing SSH known host entry for compute host at %s' % host)744 log('Removing SSH known host entry for compute host at %s' % host)
738745
=== modified file 'unit_tests/test_nova_cc_utils.py'
--- unit_tests/test_nova_cc_utils.py 2015-09-24 16:29:26 +0000
+++ unit_tests/test_nova_cc_utils.py 2015-10-06 15:50:49 +0000
@@ -602,6 +602,16 @@
602 _known_hosts.assert_called_with('bar', None)602 _known_hosts.assert_called_with('bar', None)
603603
604 @patch.object(utils, 'known_hosts')604 @patch.object(utils, 'known_hosts')
605 @patch('subprocess.check_output')
606 def test_ssh_known_host_key_bug1500589(self, _check_output, _known_hosts):
607 """On precise ssh-keygen does not error if host not found in file. So
608 check charm processes empty output properly"""
609 _known_hosts.return_value = '/foo/known_hosts'
610 _check_output.return_value = ''
611 key = utils.ssh_known_host_key('test')
612 self.assertEquals(key, None)
613
614 @patch.object(utils, 'known_hosts')
605 @patch('subprocess.check_call')615 @patch('subprocess.check_call')
606 def test_remove_known_host(self, _check_call, _known_hosts):616 def test_remove_known_host(self, _check_call, _known_hosts):
607 _known_hosts.return_value = '/foo/known_hosts'617 _known_hosts.return_value = '/foo/known_hosts'

Subscribers

People subscribed via source and target branches