Merge lp:~niedbalski/charms/trusty/quantum-gateway/charm-helpers-sync into lp:~openstack-charmers/charms/trusty/quantum-gateway/next

Proposed by Jorge Niedbalski
Status: Merged
Merged at revision: 73
Proposed branch: lp:~niedbalski/charms/trusty/quantum-gateway/charm-helpers-sync
Merge into: lp:~openstack-charmers/charms/trusty/quantum-gateway/next
Diff against target: 55 lines (+15/-4)
2 files modified
hooks/charmhelpers/contrib/network/ip.py (+7/-3)
hooks/charmhelpers/core/host.py (+8/-1)
To merge this branch: bzr merge lp:~niedbalski/charms/trusty/quantum-gateway/charm-helpers-sync
Reviewer Review Type Date Requested Status
Xiang Hui (community) Approve
OpenStack Charmers Pending
Review via email: mp+238603@code.launchpad.net

Description of the change

- Sync charm-helpers for fixing for support the fix for LP: #1382050

To post a comment you must log in.
Revision history for this message
Ryan Beisner (1chb1n) wrote :

UOSCI bot says:
This MP triggered a test on the Ubuntu OSCI system. Here is a summary of results.

#640 quantum-gateway-next for niedbalski mp238603
charm_lint_check

This build:
http://10.98.191.181:8080/job/charm_lint_check/640/

MP URL:
https://code.launchpad.net/~niedbalski/charms/trusty/quantum-gateway/charm-helpers-sync/+merge/238603

Proposed branch:
lp:~niedbalski/charms/trusty/quantum-gateway/charm-helpers-sync

Results summary:
    LINT OK: believed to pass, but you should confirm results

LINT Results (max last 25 lines) from
/var/lib/jenkins/workspace/charm_lint_check/make-lint.640:
I: config.yaml: option ext-port has no default value
I: config.yaml: option os-data-network has no default value
I: config.yaml: option instance-mtu has no default value
I: config.yaml: option external-network-id has no default value

Ubuntu OSCI Jenkins is currently in development on a Canonical private network, but we plan to publish results to a public instance soon. Tests are triggered if the proposed branch rev changes, or if the MP is placed into "Needs review" status after being otherwise for >= 1hr. Human review of results is still recommended.
http://10.98.191.181:8080/

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

UOSCI bot says:
This MP triggered a test on the Ubuntu OSCI system. Here is a summary of results.

#457 quantum-gateway-next for niedbalski mp238603
charm_unit_test

This build:
http://10.98.191.181:8080/job/charm_unit_test/457/

MP URL:
https://code.launchpad.net/~niedbalski/charms/trusty/quantum-gateway/charm-helpers-sync/+merge/238603

Proposed branch:
lp:~niedbalski/charms/trusty/quantum-gateway/charm-helpers-sync

Results summary:
    UNIT OK: believed to pass, but you should confirm results

UNIT Results (max last 25 lines) from
/var/lib/jenkins/workspace/charm_unit_test/unit-test.457:
Starting unit tests...
..................................................................................
Name Stmts Miss Cover Missing
------------------------------------------------------
hooks/quantum_contexts 127 5 96% 117, 192, 229-231
hooks/quantum_hooks 97 0 100%
hooks/quantum_utils 199 1 99% 354
------------------------------------------------------
TOTAL 423 6 99%
----------------------------------------------------------------------
Ran 82 tests in 3.700s

OK

Ubuntu OSCI Jenkins is currently in development on a Canonical private network, but we plan to publish results to a public instance soon. Tests are triggered if the proposed branch rev changes, or if the MP is placed into "Needs review" status after being otherwise for >= 1hr. Human review of results is still recommended.
http://10.98.191.181:8080/

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

UOSCI bot says:
This MP triggered a test on the Ubuntu OSCI system. Here is a summary of results.

#651 quantum-gateway-next for niedbalski mp238603
charm_lint_check

This build:
http://10.98.191.181:8080/job/charm_lint_check/651/

MP URL:
https://code.launchpad.net/~niedbalski/charms/trusty/quantum-gateway/charm-helpers-sync/+merge/238603

Proposed branch:
lp:~niedbalski/charms/trusty/quantum-gateway/charm-helpers-sync

Results summary:
    LINT OK: believed to pass, but you should confirm results

LINT Results (max last 25 lines) from
/var/lib/jenkins/workspace/charm_lint_check/make-lint.651:
I: config.yaml: option ext-port has no default value
I: config.yaml: option os-data-network has no default value
I: config.yaml: option instance-mtu has no default value
I: config.yaml: option external-network-id has no default value

Ubuntu OSCI Jenkins is currently in development on a Canonical private network, but we plan to publish results to a public instance soon. Tests are triggered if the proposed branch rev changes, or if the MP is placed into "Needs review" status after being otherwise for >= 1hr. Human review of results is still recommended.
http://10.98.191.181:8080/

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

UOSCI bot says:
This MP triggered a test on the Ubuntu OSCI system. Here is a summary of results.

#230 quantum-gateway-next for niedbalski mp238603
charm_amulet_test

This build:
http://10.98.191.181:8080/job/charm_amulet_test/230/

MP URL:
https://code.launchpad.net/~niedbalski/charms/trusty/quantum-gateway/charm-helpers-sync/+merge/238603

Proposed branch:
lp:~niedbalski/charms/trusty/quantum-gateway/charm-helpers-sync

Results summary:
    AMULET FAIL: amulet-test failed

AMULET Results (max last 25 lines) from
/var/lib/jenkins/workspace/charm_amulet_test/make-test.230:
    'Endpoints': [endpoint_a, endpoint_b]
  File "/usr/lib/python2.7/dist-packages/jujuclient.py", line 148, in _rpc
    raise EnvError(result)
jujuclient.EnvError: <Env Error - Details:
 { u'Error': u'service "rabbitmq-server-sentry" not found',
    u'ErrorCode': u'not found',
    u'RequestId': 1,
    u'Response': { }}
 >
Traceback (most recent call last):
  File "tests/15-basic-trusty-icehouse", line 8, in <module>
    deployment = QuantumGatewayBasicDeployment(series='trusty')
  File "/var/lib/jenkins/checkout/quantum-gateway/tests/basic_deployment.py", line 34, in __init__
    self._deploy()
  File "/var/lib/jenkins/checkout/quantum-gateway/tests/charmhelpers/contrib/amulet/deployment.py", line 66, in _deploy
    self.d.setup(timeout=900)
  File "/usr/lib/python2.7/dist-packages/amulet/deployer.py", line 266, in setup
    self.juju_env], cwd=self.deployer_dir)
  File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['juju-deployer', '-W', '-L', '-c', '/tmp/amulet-juju-deployer-y7TmYg.json', '-e', 'osci-sv07', 'osci-sv07']' returned non-zero exit status 1
WARNING cannot delete security group "juju-osci-sv07-0". Used by another environment?
juju-test INFO : Results: 1 passed, 2 failed, 0 errored
ERROR subprocess encountered error code 2
make: *** [test] Error 2

Ubuntu OSCI Jenkins is currently in development on a Canonical private network, but we plan to publish results to a public instance soon. Tests are triggered if the proposed branch rev changes, or if the MP is placed into "Needs review" status after being otherwise for >= 1hr. Human review of results is still recommended.
http://10.98.191.181:8080/

Revision history for this message
Xiang Hui (xianghui) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/charmhelpers/contrib/network/ip.py'
2--- hooks/charmhelpers/contrib/network/ip.py 2014-10-07 21:03:47 +0000
3+++ hooks/charmhelpers/contrib/network/ip.py 2014-10-16 17:44:36 +0000
4@@ -140,7 +140,8 @@
5 if address.version == 4 and netifaces.AF_INET in addresses:
6 addr = addresses[netifaces.AF_INET][0]['addr']
7 netmask = addresses[netifaces.AF_INET][0]['netmask']
8- cidr = netaddr.IPNetwork("%s/%s" % (addr, netmask))
9+ network = netaddr.IPNetwork("%s/%s" % (addr, netmask))
10+ cidr = network.cidr
11 if address in cidr:
12 if key == 'iface':
13 return iface
14@@ -149,11 +150,14 @@
15 if address.version == 6 and netifaces.AF_INET6 in addresses:
16 for addr in addresses[netifaces.AF_INET6]:
17 if not addr['addr'].startswith('fe80'):
18- cidr = netaddr.IPNetwork("%s/%s" % (addr['addr'],
19- addr['netmask']))
20+ network = netaddr.IPNetwork("%s/%s" % (addr['addr'],
21+ addr['netmask']))
22+ cidr = network.cidr
23 if address in cidr:
24 if key == 'iface':
25 return iface
26+ elif key == 'netmask' and cidr:
27+ return str(cidr).split('/')[1]
28 else:
29 return addr[key]
30 return None
31
32=== modified file 'hooks/charmhelpers/core/host.py'
33--- hooks/charmhelpers/core/host.py 2014-09-25 15:37:05 +0000
34+++ hooks/charmhelpers/core/host.py 2014-10-16 17:44:36 +0000
35@@ -6,6 +6,7 @@
36 # Matthew Wedgwood <matthew.wedgwood@canonical.com>
37
38 import os
39+import re
40 import pwd
41 import grp
42 import random
43@@ -317,7 +318,13 @@
44 ip_output = (line for line in ip_output if line)
45 for line in ip_output:
46 if line.split()[1].startswith(int_type):
47- interfaces.append(line.split()[1].replace(":", ""))
48+ matched = re.search('.*: (bond[0-9]+\.[0-9]+)@.*', line)
49+ if matched:
50+ interface = matched.groups()[0]
51+ else:
52+ interface = line.split()[1].replace(":", "")
53+ interfaces.append(interface)
54+
55 return interfaces
56
57

Subscribers

People subscribed via source and target branches