Univention Bugzilla – Bug 36147
Multiple EC2 connections
Last modified: 2014-11-26 06:53:57 CET
I've created two EC2 connections for different regions: {'available': True, 'cloudtype': 'EC2', 'last_update': 1413011175.001877, 'last_update_try': 1413011175.001877, 'name': 'Amazon Ireland', 'url': 'EC2_EU_WEST'}, {'available': True, 'cloudtype': 'EC2', 'last_update': 1413011164.817835, 'last_update_try': 1413011164.817835, 'name': 'Amazon South America', 'url': 'EC2_SA_EAST'} But I get only the instances from SA_EAST.
During the creation of the second EC2 instance I first got the following traceback in the log file. In UVMM it was a message that the name is invalid: 2014-10-11 09:03:30,077 - uvmmd.unix - ERROR - [27] Exception: Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/univention/uvmm/unix.py", line 149, in handle_command res = cmd(self, command) File "/usr/lib/pymodules/python2.7/univention/uvmm/commands.py", line 65, in L_CLOUD_ADD cloudnode.cloudconnections.add_connection(request.args) File "/usr/lib/pymodules/python2.7/univention/uvmm/cloudnode.py", line 120, in add_connection self[cloud["name"]] = create_cloud_connection(cloud, self.cache_dir) File "/usr/lib/pymodules/python2.7/univention/uvmm/cloudnode.py", line 215, in create_cloud_connection return EC2CloudConnection(cloud, cache_dir) File "/usr/lib/pymodules/python2.7/univention/uvmm/ec2cloud.py", line 114, in __init__ super(EC2CloudConnection, self).__init__(cloud, cache_dir) File "/usr/lib/pymodules/python2.7/univention/uvmm/cloudconnection.py", line 85, in __init__ self.cache_restore() File "/usr/lib/pymodules/python2.7/univention/uvmm/cloudconnection.py", line 181, in cache_restore if os.path.isfile(cache_file_name): File "/usr/lib/python2.7/genericpath.py", line 29, in isfile st = os.stat(path) UnicodeEncodeError: 'ascii' codec can't encode character u'\xe3' in position 63: ordinal not in range(128) I changed the name in UVMM but the connection was created too. After removing the "São Paulo" connection, everything worked as expected.
Strange, after some time I again get only the instance from one EC2 connection regardless which cloud I select.
tested separately by changing the region in ldap and restart uvmmd: EC2_EU_WEST 'EU (Ireland)' - 79 instances EC2_US_EAST 'US East (N. Virginia)' - Error: Invalid region: EC2_US_EAST EC2_US_WEST 'West (N. California)' - 0 instances EC2_US_WEST_OREGON 'US West (Oregon)' - 0 instances EC2_AP_SOUTHEAST 'Asia Pacific (Sydney)' - 0 instances EC2_AP_NORTHEAST 'Asia Pacific (Tokyo)' - 0 instances EC2_AP_SOUTHEAST2 'Asia Pacific (Singapore)' - 0 instances EC2_SA_EAST 'South America (São Paulo)' - 0 instances adding EC2_EU_WEST and EC2_SA_EAST at the same time, then both are empty (0 instances).
libcloud used a global class definition for the ec2 connection endpoint, which prevented connections to more than one endpoint. Fixed with r13931 + 13932 50_fix_ec2_us_east_multiple_connections_and_instance_states.patch libcloud 0.15.1-1.7.201410291105
Verified: (In reply to Erik Damrose from comment #4) > r13931 + 13932 > 50_fix_ec2_us_east_multiple_connections_and_instance_states.patch > libcloud 0.15.1-1.7.201410291105 Verified: region EC2_US_EAST is working Verified: uvmm/libcloud works now with more than one region
(In reply to Andreas Peichert from comment #5) > Verified: region EC2_US_EAST is working > Verified: uvmm/libcloud works now with more than one region Yes.
UCS 4.0-0 has been released: http://docs.univention.de/release-notes-4.0-0-en.html http://docs.univention.de/release-notes-4.0-0-de.html If this error occurs again, please use "Clone This Bug".