Running eutester testcase instancetest.py => BasicInstanceChecks. Ping will fail and testcase will fail when running against instances launched from a cached image. Looks like ping isn't going through the entire 10 poll count.
$ ./testcases/cloud_user/instances/instancetest.py --credpath=/home/hspencer/admin-creds/ --emi emi-A1BF3721 --tests BasicInstanceChecks --instance-user root --user-data /home/hspencer/cloud-init.config
setuptestname:None
setup_debugmethod:
testcasename:None
log_level:None
logfile:None
logfile_level:debug
Starting setup_debugmethod, name:instancetest
After populating... setup_debugmethod: testcasename:Nonelog_level:debuglogfile:Nonelogfile_level:debug
[2013-07-04 09:07:47,574] [instancetest] [DEBUG]: instancetest: Eulogger init test message. Init complete
[2013-07-04 09:07:47,577] [instancetest] [DEBUG]: (setuptestcase:335): <pre>
[2013-07-04 09:07:47,580] [instancetest] [DEBUG]: (show_self:1300):
-------------------------------------------------------------------------
TESTCASE INFO:
----------
NAME: --->: instancetest
TEST LIST: --->: []
CONFIG FILES: --->: []
-------------------------------------------------------------------------
[2013-07-04 09:07:47,583] [instancetest] [DEBUG]: (show_args:1321):
-------------------------------------------------------------------------
TEST ARGS: VALUE:
---------- ------
debug_method --->: <bound method InstanceBasics.debug of <__main__.InstanceBasics testMethod=instancetest>>
logger --->: <eutester.eulogger.Eulogger object at 0x2b6c5d0>
-------------------------------------------------------------------------
setup_debugmethod:
testcasename:None
log_level:None
logfile:None
logfile_level:None
Starting setup_debugmethod, name:instancetest
After populating... setup_debugmethod: testcasename:Nonelog_level:debuglogfile:Nonelogfile_level:debug
[2013-07-04 09:07:47,585] [instancetest] [DEBUG]: instancetest: Eulogger init test message. Init complete
[2013-07-04 09:07:47,588] [instancetest] [DEBUG]: (show_self:1300):
-------------------------------------------------------------------------
TESTCASE INFO:
----------
NAME: --->: instancetest
TEST LIST: --->: []
CONFIG FILES: --->: []
-------------------------------------------------------------------------
[2013-07-04 09:07:47,591] [instancetest] [DEBUG]: (show_args:1321):
-------------------------------------------------------------------------
TEST ARGS: VALUE:
---------- ------
args --->: Namespace(config=None, config_file=None, configblocks=[], configfile=None, configsections=['MEMO', 'globals', 'instancetest'], cred_path='/home/hspencer/admin-creds/', credpath='/home/hspencer/admin-creds/', emi='emi-A1BF3721', html_anchors=False, ignoreblocks=[], instance_passsword=None, instance_user='root', keypair=None, log_level='debug', logfile=None, logfile_level='debug', password=None, region=None, tests=['BasicInstanceChecks'], use_color=False, user_data='/home/hspencer/cloud-init.config', vmtype='c1.medium', zone=None)
config --->: None
config_file --->: None
configblocks --->: []
configfile --->: None
configsections --->: ['MEMO', 'globals', 'instancetest']
cred_path --->: /home/hspencer/admin-creds/
credpath --->: /home/hspencer/admin-creds/
debug_method --->: <bound method InstanceBasics.debug of <__main__.InstanceBasics testMethod=instancetest>>
emi --->: emi-A1BF3721
html_anchors --->: False
ignoreblocks --->: []
instance_passsword --->: None
instance_user --->: root
keypair --->: None
log_level --->: debug
logfile --->: None
logfile_level --->: debug
logger --->: <eutester.eulogger.Eulogger object at 0x2b6cdd0>
password --->: None
region --->: None
tests --->: ['BasicInstanceChecks']
use_color --->: False
user_data --->: /home/hspencer/cloud-init.config
vmtype --->: c1.medium
zone --->: None
-------------------------------------------------------------------------
[2013-07-04 09:07:47,592] [EUCAOPS] [DEBUG]: EUCAOPS: Eulogger init test message. Init complete
[2013-07-04 09:07:47,592] [EUCAOPS] [DEBUG]:
--->(ec2ops.py:124)Starting method: setup_ec2_connection(self, endpoint=10.104.1.216, aws_access_key_id=L4836KVYWMJCXT4T6Q6B9, aws_secret_access_key=XCJ6sZVFVfFMR4DNVIUL7N7e4cgk8ebvEW0ej5dZ, is_secure=False, host=None, region=None, path=/services/Eucalyptus, port=8773, APIVersion=2011-01-01, boto_debug=0)
[2013-07-04 09:07:47,592] [EUCAOPS] [DEBUG]: Attempting to create ec2 connection to 10.104.1.2168773/services/Eucalyptus
[2013-07-04 09:07:47,593] [EUCAOPS] [DEBUG]: Attempting to create IAM connection to 10.104.1.216:8773/services/Euare
[2013-07-04 09:07:47,594] [EUCAOPS] [DEBUG]: Attempting to create STS connection to 10.104.1.2168773/services/Eucalyptus
[2013-07-04 09:07:47,595] [EUCAOPS] [DEBUG]:
--->(cwops.py:122)Starting method: setup_cw_connection(self, endpoint=10.104.1.216, aws_access_key_id=L4836KVYWMJCXT4T6Q6B9, aws_secret_access_key=XCJ6sZVFVfFMR4DNVIUL7N7e4cgk8ebvEW0ej5dZ, is_secure=False, host=None, region=None, path=/services/CloudWatch, port=8773, boto_debug=0)
[2013-07-04 09:07:47,595] [EUCAOPS] [DEBUG]: Attempting to create cloud watch connection to 10.104.1.2168773/services/CloudWatch
[2013-07-04 09:07:47,595] [EUCAOPS] [DEBUG]: Attempting to create S3 connection to 10.104.1.216:8773/services/Walrus
[2013-07-04 09:07:47,595] [EUCAOPS] [DEBUG]: Unable to create AS connection because of: Unable to find AWS_AUTO_SCALING_URL id in eucarc
[2013-07-04 09:07:47,596] [EUCAOPS] [DEBUG]:
--->(elbops.py:88)Starting method: setup_elb_connection(self, endpoint=10.104.1.216, aws_access_key_id=L4836KVYWMJCXT4T6Q6B9, aws_secret_access_key=XCJ6sZVFVfFMR4DNVIUL7N7e4cgk8ebvEW0ej5dZ, is_secure=False, host=None, region=None, path=/services/LoadBalancing, port=8773, boto_debug=0)
[2013-07-04 09:07:47,596] [EUCAOPS] [DEBUG]: Attempting to create cloud watch connection to 10.104.1.2168773/services/LoadBalancing
[2013-07-04 09:07:47,596] [EUCAOPS] [DEBUG]:
--->(ec2ops.py:358)Starting method: add_group(self, group_name=group-1372954067.6, description=None, fail_if_exists=False)
[2013-07-04 09:07:47,596] [EUCAOPS] [DEBUG]: Looking up group group-1372954067.6
[2013-07-04 09:07:47,648] [EUCAOPS] [DEBUG]: Creating Security Group: group-1372954067.6
[2013-07-04 09:07:47,770] [EUCAOPS] [DEBUG]: Found matching security group for name:group-1372954067.6 and id:None
[2013-07-04 09:07:47,770] [EUCAOPS] [DEBUG]:
--->(ec2ops.py:418)Starting method: authorize_group_by_name(self, group_name=group-1372954067.6, port=22, protocol=tcp, cidr_ip=0.0.0.0/0)
[2013-07-04 09:07:47,771] [EUCAOPS] [DEBUG]: Attempting authorization of group-1372954067.6 on port 22 tcp
[2013-07-04 09:07:47,826] [EUCAOPS] [DEBUG]:
--->(ec2ops.py:418)Starting method: authorize_group_by_name(self, group_name=group-1372954067.6, port=-1, protocol=icmp, cidr_ip=0.0.0.0/0)
[2013-07-04 09:07:47,826] [EUCAOPS] [DEBUG]: Attempting authorization of group-1372954067.6 on port -1 icmp
[2013-07-04 09:07:47,876] [EUCAOPS] [DEBUG]: Looking up keypair keypair-1372954067.88
[2013-07-04 09:07:47,910] [EUCAOPS] [DEBUG]: Creating keypair: keypair-1372954067.88
Creating testunit:BasicInstanceChecks, args:
[2013-07-04 09:07:48,239] [instancetest] [DEBUG]: (populate_testunit_with_args:1339): Attempting to populate testunit:BasicInstanceChecks, with testcase.args...
[2013-07-04 09:07:48,244] [instancetest] [DEBUG]: (populate_testunit_with_args:1347): Testunit keyword args:{}
[2013-07-04 09:07:48,247] [instancetest] [DEBUG]: (populate_testunit_with_args:1352): Got method args:('self', 'zone')
[2013-07-04 09:07:48,250] [instancetest] [DEBUG]: (populate_testunit_with_args:1360): test unit total args:{}
[2013-07-04 09:07:48,253] [instancetest] [DEBUG]: (populate_testunit_with_args:1366): Found matching arg for:zone
[2013-07-04 09:07:48,256] [instancetest] [DEBUG]: (print_test_unit_startmsg:856):
-------------------------------------------------------------------------
STARTING TESTUNIT: BasicInstanceChecks
METHOD:BasicInstanceChecks, TEST DESCRIPTION:
This Case Was Developed To Run Through A Series Of Basic Instance Tests.
The Tests Are As Follows:
- Execute Run_Instances Command
- Make Sure That Public Dns Name And Private Ip Aren'T The Same
(This Is For Managed/Managed-Novlan Networking Modes)
- Test To See If Instance Is Ping-Able
- Test To Make Sure That Instance Is Accessible Via Ssh
(Ssh Into Instance And Run Basic Ls Command)
If Any Of These Tests Fail, The Test Case Will Error Out, Logging The Results.
End on Failure:False
Passing ARGS:
---------------------
zone : None
---------------------
Running list method: "BasicInstanceChecks(zone:None)"
-------------------------------------------------------------------------
KWARG:zone = None
[2013-07-04 09:07:48,256] [EUCAOPS] [DEBUG]:
--->(ec2ops.py:2239)Starting method: run_instance(self, image=emi-A1BF3721, keypair=keypair-1372954067.88, group=group-1372954067.6, type=None, zone=LayinDaSmackDown, min=1, max=1, user_data=/home/hspencer/cloud-init.config, private_addressing=False, username=root, password=None, is_reachable=True, monitoring_enabled=False, timeout=480)
[2013-07-04 09:07:48,257] [EUCAOPS] [DEBUG]:
--->(ec2ops.py:1881)Starting method: get_images(self, emi=emi-A1BF3721, root_device_type=None, root_device_name=None, location=None, state=available, arch=None, owner_id=None, filters=None, not_location=None, max_count=1)
[2013-07-04 09:07:48,438] [EUCAOPS] [DEBUG]: Got 14 images matching prefix: emi-A1BF3721, now filtering...
[2013-07-04 09:07:48,438] [EUCAOPS] [DEBUG]: Returning image:emi-A1BF3721
[2013-07-04 09:07:48,439] [EUCAOPS] [DEBUG]: Attempting to run instance-store image Image:emi-A1BF3721 in group group-1372954067.6
[2013-07-04 09:07:48,703] [EUCAOPS] [DEBUG]: Beginning poll loop for the 1 instance found in [Instance:i-96804019]
[2013-07-04 09:07:48,704] [EUCAOPS] [DEBUG]: Beginning poll loop for instance Instance:i-96804019 to go to running
[2013-07-04 09:07:48,778] [EUCAOPS] [DEBUG]: Instance(i-96804019) State(pending), elapsed:0/480
[2013-07-04 09:07:58,892] [EUCAOPS] [DEBUG]: Instance(i-96804019) State(pending), elapsed:10/480
[2013-07-04 09:08:08,992] [EUCAOPS] [DEBUG]: Instance(i-96804019) State(pending), elapsed:20/480
[2013-07-04 09:08:19,099] [EUCAOPS] [DEBUG]: Instance(i-96804019) State(running) time elapsed (30)
[2013-07-04 09:08:19,099] [EUCAOPS] [DEBUG]: Instance:i-96804019 is now in running
[2013-07-04 09:08:19,099] [EUCAOPS] [DEBUG]: Instance i-96804019 now in running state in zone: LayinDaSmackDown
[2013-07-04 09:08:19,100] [EUCAOPS] [DEBUG]: Instance:i-96804019 got Public IP: 10.104.7.12 Private IP: 172.17.112.234 Public DNS Name: 10.104.7.12 Private DNS Name: 172.17.112.234
[2013-07-04 09:08:19,100] [EUCAOPS] [DEBUG]:
--->(ec2ops.py:2865)Starting method: wait_for_valid_ip(self, instances=Instance:i-96804019, private_addressing=False, poll_interval=10, timeout=60)
[2013-07-04 09:08:19,193] [EUCAOPS] [DEBUG]: i-96804019: FOUND public ip. Current:10.104.7.12, elapsed:0/60
[2013-07-04 09:08:19,193] [EUCAOPS] [DEBUG]: Check_system_for_dup_ip starting...
[2013-07-04 09:08:19,362] [EUCAOPS] [DEBUG]: Checking reservation: r-D61E3E4D
[2013-07-04 09:08:19,362] [EUCAOPS] [DEBUG]: Checking instance i-8805459E , state:running pubip:10.104.7.10 privip:172.17.116.138
[2013-07-04 09:08:19,362] [EUCAOPS] [DEBUG]: Checking reservation: r-557F3DD1
[2013-07-04 09:08:19,362] [EUCAOPS] [DEBUG]: Checking instance i-96804019 , state:running pubip:10.104.7.12 privip:172.17.112.234
[2013-07-04 09:08:19,362] [EUCAOPS] [DEBUG]: Checking reservation: r-36533C3E
[2013-07-04 09:08:19,362] [EUCAOPS] [DEBUG]: Checking instance i-997E4489 , state:terminated pubip:172.17.116.137 privip:172.17.116.137
[2013-07-04 09:08:19,362] [EUCAOPS] [DEBUG]: Checking reservation: r-43114410
[2013-07-04 09:08:19,363] [EUCAOPS] [DEBUG]: Checking instance i-83D64095 , state:running pubip:10.104.7.11 privip:172.17.116.148
[2013-07-04 09:08:19,363] [EUCAOPS] [DEBUG]: Done with check_system_for_dup_ip
[2013-07-04 09:08:19,363] [EUCAOPS] [DEBUG]: Wait_for_valid_ip done
[2013-07-04 09:08:19,363] [EUCAOPS] [DEBUG]: Attempting to ping 10.104.7.12
TESTUNIT FAILED: BasicInstanceChecksTraceback (most recent call last):
File "/home/hspencer/eutester-dev/lib/python2.6/site-packages/eutester-0.0.7-py2.6.egg/eutester/eutestcase.py", line 277, in run
ret = self.method(*self.args, **self.kwargs)
File "./testcases/cloud_user/instances/instancetest.py", line 76, in BasicInstanceChecks
keypair=self.keypair.name, group=self.group.name, zone=zone, timeout=self.instance_timeout)
File "/home/hspencer/eutester-dev/lib/python2.6/site-packages/eutester-0.0.7-py2.6.egg/eutester/__init__.py", line 341, in methdecor
return func(*func_args, **func_kwargs)
File "/home/hspencer/eutester-dev/lib/python2.6/site-packages/eutester-0.0.7-py2.6.egg/eucaops/ec2ops.py", line 2348, in run_instance
self.ping(instance.ip_address, 20)
File "/home/hspencer/eutester-dev/lib/python2.6/site-packages/eutester-0.0.7-py2.6.egg/eutester/__init__.py", line 170, in ping
if self.found("ping -c 1 " + address, "1.*1.*received"):
File "/home/hspencer/eutester-dev/lib/python2.6/site-packages/eutester-0.0.7-py2.6.egg/eutester/__init__.py", line 151, in found
result = self.local(command)
File "/home/hspencer/eutester-dev/lib/python2.6/site-packages/eutester-0.0.7-py2.6.egg/eutester/__init__.py", line 145, in local
raise error
CalledProcessError: Command 'ping -c 1 10.104.7.12' returned non-zero exit status 1