Finally got a chance to deploying all of this at once. I know the quantum charm is targeted toward quantal, but I'd really like to have a charm that can deploy this stuff to Precise via the cloud archive, as well. Trying to deploy this to 12.04, I found the use of python-dnspython is problematic. The following snippet works fine on 12.10 but raises socket.error on 12.04:
#!/usr/bin/python
import dns.resolver
import dns.ipv4
hostname='www.ubuntu.com'
try:
# Test to see if already an IPv4 address
dns.ipv4.inet_aton(hostname)
print hostname
except dns.exception.SyntaxError:
try:
answers = dns.resolver.query(hostname, 'A')
if answers:
print answers[0].address
except dns.resolver.NXDOMAIN:
pass
On 12.04, it bails with "socket.error: illegal IP address string passed to inet_aton". Also, the nova-compute charm doesn't verify the output of get_ip, so the hooks that call get_ip() continue to execute without invalid configuration. I wonder if something more standardcould be used instead:
Aside form that, the quantum integration seems work okay from Juju's POV. After deployed, I tried creating networks and launching instances. I can get instances to spin up with fixed IPs associated, but the instances are having trouble picking up its metadata. I'm not certain config drive is working correctly, or perhaps I've forgotten a step. I'll sync up with you tomorrow and get some pointers on that.
James-
Finally got a chance to deploying all of this at once. I know the quantum charm is targeted toward quantal, but I'd really like to have a charm that can deploy this stuff to Precise via the cloud archive, as well. Trying to deploy this to 12.04, I found the use of python-dnspython is problematic. The following snippet works fine on 12.10 but raises socket.error on 12.04:
#!/usr/bin/python 'www.ubuntu. com' inet_aton( hostname) SyntaxError: query(hostname, 'A') NXDOMAIN:
import dns.resolver
import dns.ipv4
hostname=
try:
# Test to see if already an IPv4 address
dns.ipv4.
print hostname
except dns.exception.
try:
answers = dns.resolver.
if answers:
print answers[0].address
except dns.resolver.
pass
On 12.04, it bails with "socket.error: illegal IP address string passed to inet_aton". Also, the nova-compute charm doesn't verify the output of get_ip, so the hooks that call get_ip() continue to execute without invalid configuration. I wonder if something more standardcould be used instead:
import socket 'www.ubuntu. com' gethostbyname( hostname)
hostname=
try:
print socket.
except socket.gaierror:
pass
Aside form that, the quantum integration seems work okay from Juju's POV. After deployed, I tried creating networks and launching instances. I can get instances to spin up with fixed IPs associated, but the instances are having trouble picking up its metadata. I'm not certain config drive is working correctly, or perhaps I've forgotten a step. I'll sync up with you tomorrow and get some pointers on that.