one subnet couldn't be deleted when tear down the lab.
"The subnet 'subnet-032618229ceab3467' has dependencies and cannot be deleted."
ubuntu@ip-172-31-37-255:~/f5_provisioner/provisioner$ ansible-playbook teardown_lab.yml -e @f5_vars.yml
/usr/lib/python2.7/dist-packages/requests/init.py:80: RequestsDependencyWarning: urllib3 (1.25.7) or chardet (3.0.4) doesn't match a supported version!
RequestsDependencyWarning)
/usr/lib/python2.7/dist-packages/requests/init.py:80: RequestsDependencyWarning: urllib3 (1.25.7) or chardet (3.0.4) doesn't match a supported version!
RequestsDependencyWarning)
/usr/lib/python2.7/dist-packages/requests/init.py:80: RequestsDependencyWarning: urllib3 (1.25.7) or chardet (3.0.4) doesn't match a supported version!
RequestsDependencyWarning)
PLAY [Destroy lab instances in AWS] ****
TASK [include_role : manage_ec2_instances] *****
TASK [manage_ec2_instances : include_tasks] ****
/usr/lib/python2.7/dist-packages/requests/init.py:80: RequestsDependencyWarning: urllib3 (1.25.7) or chardet (3.0.4) doesn't match a supported version!
RequestsDependencyWarning)
included: /home/ubuntu/f5_provisioner/provisioner/roles/manage_ec2_instances/tasks/teardown.yml for localhost
/usr/lib/python2.7/dist-packages/requests/init.py:80: RequestsDependencyWarning: urllib3 (1.25.7) or chardet (3.0.4) doesn't match a supported version!
RequestsDependencyWarning)
TASK [manage_ec2_instances : Find AZ zone for region us-west-2] ****
ok: [localhost]
TASK [manage_ec2_instances : Set AZ zone to first available] ***
ok: [localhost]
TASK [manage_ec2_instances : Grab facts for workshop] **
[DEPRECATION WARNING]: The 'ec2_instance_facts' module has been renamed to 'ec2_instance_info'. This feature will be removed in version 2.13. Deprecation warnings can be
disabled by setting deprecation_warnings=False in ansible.cfg.
ok: [localhost]
TASK [manage_ec2_instances : Get the VPC ID for TESTWORKSHOP1] *****
[DEPRECATION WARNING]: The 'ec2_vpc_net_facts' module has been renamed to 'ec2_vpc_net_info'. This feature will be removed in version 2.13. Deprecation warnings can be
disabled by setting deprecation_warnings=False in ansible.cfg.
ok: [localhost]
TASK [manage_ec2_instances : Use set fact for easier variables] ****
ok: [localhost]
TASK [manage_ec2_instances : Deleted EC2 security group for VPC vpc-TESTWORKSHOP1] *****
FAILED - RETRYING: Deleted EC2 security group for VPC vpc-TESTWORKSHOP1 (50 retries left).
FAILED - RETRYING: Deleted EC2 security group for VPC vpc-TESTWORKSHOP1 (49 retries left).
FAILED - RETRYING: Deleted EC2 security group for VPC vpc-TESTWORKSHOP1 (48 retries left).
FAILED - RETRYING: Deleted EC2 security group for VPC vpc-TESTWORKSHOP1 (47 retries left).
FAILED - RETRYING: Deleted EC2 security group for VPC vpc-TESTWORKSHOP1 (46 retries left).
FAILED - RETRYING: Deleted EC2 security group for VPC vpc-TESTWORKSHOP1 (45 retries left).
FAILED - RETRYING: Deleted EC2 security group for VPC vpc-TESTWORKSHOP1 (44 retries left).
FAILED - RETRYING: Deleted EC2 security group for VPC vpc-TESTWORKSHOP1 (43 retries left).
FAILED - RETRYING: Deleted EC2 security group for VPC vpc-TESTWORKSHOP1 (42 retries left).
FAILED - RETRYING: Deleted EC2 security group for VPC vpc-TESTWORKSHOP1 (41 retries left).
FAILED - RETRYING: Deleted EC2 security group for VPC vpc-TESTWORKSHOP1 (40 retries left).
changed: [localhost]
TASK [manage_ec2_instances : Delete subnet for TESTWORKSHOP1-vpc] **
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: botocore.exceptions.ClientError: An error occurred (DependencyViolation) when calling the DeleteSubnet operation: The subnet 'subnet-032618229ceab3467' has dependencies and cannot be deleted.
fatal: [localhost]: FAILED! => changed=false
boto3_version: 1.10.26
botocore_version: 1.13.26
error:
code: DependencyViolation
message: The subnet 'subnet-032618229ceab3467' has dependencies and cannot be deleted.
msg: 'Couldn''t delete subnet: An error occurred (DependencyViolation) when calling the DeleteSubnet operation: The subnet ''subnet-032618229ceab3467'' has dependencies and cannot be deleted.'
response_metadata:
http_headers:
connection: close
date: Sat, 14 Dec 2019 01:17:03 GMT
server: AmazonEC2
transfer-encoding: chunked
http_status_code: 400
request_id: 0228237d-6497-4394-91ea-f4153ed15857
retry_attempts: 0
one subnet couldn't be deleted when tear down the lab.
"The subnet 'subnet-032618229ceab3467' has dependencies and cannot be deleted."
ubuntu@ip-172-31-37-255:~/f5_provisioner/provisioner$ ansible-playbook teardown_lab.yml -e @f5_vars.yml /usr/lib/python2.7/dist-packages/requests/init.py:80: RequestsDependencyWarning: urllib3 (1.25.7) or chardet (3.0.4) doesn't match a supported version! RequestsDependencyWarning) /usr/lib/python2.7/dist-packages/requests/init.py:80: RequestsDependencyWarning: urllib3 (1.25.7) or chardet (3.0.4) doesn't match a supported version! RequestsDependencyWarning) /usr/lib/python2.7/dist-packages/requests/init.py:80: RequestsDependencyWarning: urllib3 (1.25.7) or chardet (3.0.4) doesn't match a supported version! RequestsDependencyWarning)
PLAY [Destroy lab instances in AWS] ****
TASK [include_role : manage_ec2_instances] *****
TASK [manage_ec2_instances : include_tasks] **** /usr/lib/python2.7/dist-packages/requests/init.py:80: RequestsDependencyWarning: urllib3 (1.25.7) or chardet (3.0.4) doesn't match a supported version! RequestsDependencyWarning) included: /home/ubuntu/f5_provisioner/provisioner/roles/manage_ec2_instances/tasks/teardown.yml for localhost /usr/lib/python2.7/dist-packages/requests/init.py:80: RequestsDependencyWarning: urllib3 (1.25.7) or chardet (3.0.4) doesn't match a supported version! RequestsDependencyWarning)
TASK [manage_ec2_instances : Find AZ zone for region us-west-2] **** ok: [localhost]
TASK [manage_ec2_instances : Set AZ zone to first available] *** ok: [localhost]
TASK [manage_ec2_instances : Grab facts for workshop] ** [DEPRECATION WARNING]: The 'ec2_instance_facts' module has been renamed to 'ec2_instance_info'. This feature will be removed in version 2.13. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. ok: [localhost]
TASK [manage_ec2_instances : Destroy EC2 instances] **** changed: [localhost]
TASK [manage_ec2_instances : Get the VPC ID for TESTWORKSHOP1] ***** [DEPRECATION WARNING]: The 'ec2_vpc_net_facts' module has been renamed to 'ec2_vpc_net_info'. This feature will be removed in version 2.13. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. ok: [localhost]
TASK [manage_ec2_instances : Use set fact for easier variables] **** ok: [localhost]
TASK [manage_ec2_instances : Deleted EC2 security group for VPC vpc-TESTWORKSHOP1] ***** FAILED - RETRYING: Deleted EC2 security group for VPC vpc-TESTWORKSHOP1 (50 retries left). FAILED - RETRYING: Deleted EC2 security group for VPC vpc-TESTWORKSHOP1 (49 retries left). FAILED - RETRYING: Deleted EC2 security group for VPC vpc-TESTWORKSHOP1 (48 retries left). FAILED - RETRYING: Deleted EC2 security group for VPC vpc-TESTWORKSHOP1 (47 retries left). FAILED - RETRYING: Deleted EC2 security group for VPC vpc-TESTWORKSHOP1 (46 retries left). FAILED - RETRYING: Deleted EC2 security group for VPC vpc-TESTWORKSHOP1 (45 retries left). FAILED - RETRYING: Deleted EC2 security group for VPC vpc-TESTWORKSHOP1 (44 retries left). FAILED - RETRYING: Deleted EC2 security group for VPC vpc-TESTWORKSHOP1 (43 retries left). FAILED - RETRYING: Deleted EC2 security group for VPC vpc-TESTWORKSHOP1 (42 retries left). FAILED - RETRYING: Deleted EC2 security group for VPC vpc-TESTWORKSHOP1 (41 retries left). FAILED - RETRYING: Deleted EC2 security group for VPC vpc-TESTWORKSHOP1 (40 retries left). changed: [localhost]
TASK [manage_ec2_instances : Delete subnet for TESTWORKSHOP1-vpc] ** An exception occurred during task execution. To see the full traceback, use -vvv. The error was: botocore.exceptions.ClientError: An error occurred (DependencyViolation) when calling the DeleteSubnet operation: The subnet 'subnet-032618229ceab3467' has dependencies and cannot be deleted. fatal: [localhost]: FAILED! => changed=false boto3_version: 1.10.26 botocore_version: 1.13.26 error: code: DependencyViolation message: The subnet 'subnet-032618229ceab3467' has dependencies and cannot be deleted. msg: 'Couldn''t delete subnet: An error occurred (DependencyViolation) when calling the DeleteSubnet operation: The subnet ''subnet-032618229ceab3467'' has dependencies and cannot be deleted.' response_metadata: http_headers: connection: close date: Sat, 14 Dec 2019 01:17:03 GMT server: AmazonEC2 transfer-encoding: chunked http_status_code: 400 request_id: 0228237d-6497-4394-91ea-f4153ed15857 retry_attempts: 0
PLAY RECAP ***** localhost : ok=8 changed=2 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
ubuntu@ip-172-31-37-255:~/f5_provisioner/provisioner$