Prasanna Santhanam created CLOUDSTACK-3735:
----------------------------------------------

             Summary: Domain deletion fails even when the networks within the 
domain have been destroyed
                 Key: CLOUDSTACK-3735
                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-3735
             Project: CloudStack
          Issue Type: Bug
      Security Level: Public (Anyone can view this level - this is the default.)
            Reporter: Prasanna Santhanam
            Priority: Critical
         Attachments: vmops.log.tar.bz2


When the domain has networks created by accounts within it and all the networks
and accounts have been destroyed we are unable to delete the domain

Steps:
1. Create a domain under ROOT
2. Create an account under the domain
3. Create a network (guest) within the account
4. delete the network
5. delete the account
6. try to delete the domain

domain deletion fails

Network in question as pointed to by the DomainManagerImpl.java

mysql> select * from networks where id=206\G
*************************** 1. row ***************************
                   id: 206
                 name: MySharedNetwork - Test
                 uuid: 5f36bbc8-2207-42e3-8bd6-d9e571ac7678
         display_text: MySharedNetwork
         traffic_type: Guest
broadcast_domain_type: Vlan
        broadcast_uri: vlan://1200
              gateway: 172.16.15.1
                 cidr: 172.16.15.0/24
                 mode: Dhcp
  network_offering_id: 17
  physical_network_id: 200
       data_center_id: 1
            guru_name: DirectNetworkGuru
                state: Destroy
              related: 206
            domain_id: 1
           account_id: 1
                 dns1: NULL
                 dns2: NULL
            guru_data: NULL
           set_fields: 0
             acl_type: Domain
       network_domain: cs1sandbox.simulator
       reservation_id: NULL
           guest_type: Shared
     restart_required: 0
              created: 2013-07-23 12:08:37
              removed: 2013-07-23 12:10:13
    specify_ip_ranges: 1
               vpc_id: NULL
          ip6_gateway: NULL
             ip6_cidr: NULL
         network_cidr: NULL
      display_network: 1
       network_acl_id: NULL
1 row in set (0.00 sec)


mysql> select * from domain_network_ref;
+----+-----------+------------+------------------+
| id | domain_id | network_id | subdomain_access |
+----+-----------+------------+------------------+
|  1 |         2 |        204 |                1 |
|  2 |         3 |        205 |                1 |
|  3 |         4 |        206 |                1 |
+----+-----------+------------+------------------+
3 rows in set (0.00 sec)


But as can be seen the state of the domain is 'Destroy' and it has been removed 
(date is non NULL)

Attaching management server logs


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to