Ask Your Question
0

How to delete network

asked 2011-02-15 17:08:24 -0500

justin-cinkelj gravatar image

There is no nova-manage network delete command. How should I delete some networks manually?

I tried to manually edit mysql DB, eg. I removed some entries in tables networks and fixed_ips. Would that be sufficient?

Can I assume that files in /var/lib/nova/networks/nova-br10?.{conf,pid} will be deleted/clean automatically after service nova-* restart, or reboot?

edit retag flag offensive close merge delete

9 answers

Sort by ยป oldest newest most voted
1

answered 2011-10-28 15:08:18 -0500

fifieldt gravatar image

Looks like this issue was fixed in the Cactus release, according to https://bugs.launchpad.net/nova/+bug/...

Does it fix your problem justinc111?

edit flag offensive delete link more
0

answered 2011-02-22 06:56:00 -0500

berendt gravatar image

I think this has to be possible with bin/nova-manage. I created a bug report here: https://bugs.launchpad.net/nova/+bug/722982 (https://bugs.launchpad.net/nova/+bug/...) .

edit flag offensive delete link more
0

answered 2011-11-08 07:29:45 -0500

justin-cinkelj gravatar image

Thanks Tom Fifield, that solved my question.

edit flag offensive delete link more
0

answered 2011-02-15 20:10:32 -0500

justin-cinkelj gravatar image

1) OK, if two networks use same bridge and/or subnet, I have to clean the database.

2) When running the very first instance from the first project, it received 10.0.0.3 IP - eg. the lowest non-reserved IP. When running instance from the second project, the first assigned IP was equal to the first IP in fixed_ips (as returned by select, without order by), and that was also equal to broadcast address.

Below, IPs are listed from 10.0.0.1 to 10.0.0.31, and later from 10.0.0.63 to 10.0.0.32.

mysql> select id, address, network_id, instance_id, allocated, leased, reserved from fixed_ips where (network_id=1 OR network_id=10); +-----+-----------+------------+-------------+-----------+--------+----------+ | id | address | network_id | instance_id | allocated | leased | reserved | +-----+-----------+------------+-------------+-----------+--------+----------+ | 1 | 10.0.0.0 | 1 | NULL | 0 | 0 | 1 | | 2 | 10.0.0.1 | 1 | NULL | 0 | 0 | 1 | | 3 | 10.0.0.2 | 1 | NULL | 0 | 0 | 1 | | 4 | 10.0.0.3 | 1 | 153 | 1 | 1 | 0 | | 5 | 10.0.0.4 | 1 | NULL | 0 | 0 | 0 | ... | 512 | 10.0.0.63 | 10 | NULL | 0 | 0 | 0 | | 511 | 10.0.0.62 | 10 | NULL | 0 | 0 | 0 | .. | 484 | 10.0.0.35 | 10 | NULL | 0 | 0 | 0 | | 483 | 10.0.0.34 | 10 | NULL | 0 | 0 | 1 | | 482 | 10.0.0.33 | 10 | NULL | 0 | 0 | 1 | | 481 | 10.0.0.32 | 10 | NULL | 0 | 0 | 1 |

edit flag offensive delete link more
0

answered 2011-02-15 17:17:28 -0500

vishvananda gravatar image

You should kill the dnsmasq associated with the network as well.

On Feb 15, 2011, at 9:08 AM, justinc111 wrote:

New question #145495 on OpenStack Compute (nova): https://answers.launchpad.net/nova/+q...

There is no nova-manage network delete command. How should I delete some networks manually?

I tried to manually edit mysql DB, eg. I removed some entries in tables networks and fixed_ips. Would that be sufficient?

Can I assume that files in /var/lib/nova/networks/nova-br10?.{conf,pid} will be deleted/clean automatically after service nova-* restart, or reboot?


You received this question notification because you are a member of Nova Core, which is an answer contact for OpenStack Compute (nova).

edit flag offensive delete link more
0

answered 2011-02-15 19:06:31 -0500

vishvananda gravatar image

yes this is normal. It is just an sql autoincrment column. On Feb 15, 2011, at 10:51 AM, justinc111 wrote:

Question #145495 on OpenStack Compute (nova) changed: https://answers.launchpad.net/nova/+q...

Status: Answered => Open

justinc111 is still having a problem: I did that too, but thanks for reminder. So basically no garbage should be left in DB after cleaning tables networks and fixed_ips, right? Because newly created networks get id number, continued from id of just deleted networks. Not that this is a problem, but I thought it is strange.

Problems showed later. After deleting some networks I left only one network:

mysql> select * from networks; +---------------------+---------------------+------------+---------+----+----------+---------------+-----------------+--------+------------+------------+------+------+--------------------+-----------------+---------------------+------------+------------+-----------+---------+-----------+ | created_at | updated_at | deleted_at | deleted | id | injected | cidr | netmask | bridge | gateway | broadcast | dns | vlan | vpn_public_address | vpn_public_port | vpn_private_address | dhcp_start | project_id | host | cidr_v6 | ra_server | +---------------------+---------------------+------------+---------+----+----------+---------------+-----------------+--------+------------+------------+------+------+--------------------+-----------------+---------------------+------------+------------+-----------+---------+-----------+ | 2011-01-28 10:08:00 | 2011-01-28 10:12:43 | NULL | 0 | 1 | 0 | 10.0.0.0/27 | 255.255.255.224 | br100 | 10.0.0.1 | 10.0.0.31 | NULL | 100 | 172.16.120.229 | 1000 | 10.0.0.2 | 10.0.0.3 | xproj | ubuntu04a | NULL | NULL |

New networks were created with nova-manage network create 10.0.0.0/24 5 32 and in DB is:

| 2011-02-14 13:17:12 | NULL | NULL | 0 | 5 | 0 | 10.0.0.32/27 | 255.255.255.224 | br101 | 10.0.0.33 | 10.0.0.63 | NULL | 101 | NULL | 1001 | 10.0.0.34 | 10.0.0.35 | NULL | NULL | NULL | NULL | | 2011-02-14 13:17:12 | NULL | NULL | 0 | 4 | 0 | 10.0.0.0/27 | 255.255.255.224 | br100 | 10.0.0.1 | 10.0.0.31 | NULL | 100 | NULL | 1000 | 10.0.0.2 | 10.0.0.3 | NULL | NULL | NULL | NULL | | 2011-02-14 13:17:12 | NULL | NULL | 0 | 6 | 0 | 10.0.0.64/27 | 255.255.255.224 | br102 | 10.0.0.65 | 10.0.0.95 | NULL | 102 | NULL | 1002 | 10.0.0.66 | 10.0.0.67 | NULL | NULL | NULL | NULL | | 2011-02-14 13:17:12 | NULL | NULL | 0 | 7 | 0 | 10.0.0.96/27 | 255.255.255.224 | br103 | 10.0.0.97 | 10.0.0.127 | NULL | 103 | NULL | 1003 | 10.0.0.98 | 10.0.0.99 | NULL | NULL | NULL | NULL | | 2011-02-14 13:17:12 | NULL | NULL | 0 | 8 | 0 | 10.0.0.128/27 | 255.255.255.224 | br104 | 10.0.0.129 | 10.0.0.159 | NULL | 104 | NULL | 1004 | 10.0.0.130 | 10.0.0.131 | NULL | NULL | NULL | NULL |

First new network has id 4, its IP subnet and bridge overlap with old network with id=1. I'm not sure if this should is a bug or a not-yet-implemented thing. I just removed network with id=4 and corresponding entries in fixed_ips table.

Well, after adding new project, VM instances got IPs from let say 10.0.0.32/27 subnet. But first instance received 10.0.0.63, which is a broadcast address. Looking at DB again:

mysql> select id, address, network_id, instance_id, allocated ...

(more)
edit flag offensive delete link more
0

answered 2011-02-15 19:20:15 -0500

justin-cinkelj gravatar image

OK, I got that. Thank you. What about (1) new networks using same bridge and IP subnet as old networks and (2) DHCP leasing broadcast address to VM instance

Two questions now. 1. What would be correct way of adding new networks? "nova-manage network create 10.0.0.0/24 5 32" required some manual cleaning in DB. 2. Is setting reserved flag in fixed_ips OK? If so, shouldn't it be done by nova?

edit flag offensive delete link more
0

answered 2011-02-15 19:51:02 -0500

vishvananda gravatar image

1) shouldn't be a problem, since you've deleted everything 2) not sure what you mean exactly. It doesn't lease the broadcast address. If you just mean DHCP in general, it will lease the proper addresses via DNSMASQ. If you have old instances running you will start hitting problems though. Instances on the old networks need to be destroyed.

Vish

On Feb 15, 2011, at 11:21 AM, justinc111 wrote:

Question #145495 on OpenStack Compute (nova) changed: https://answers.launchpad.net/nova/+q...

Status: Answered => Open

justinc111 is still having a problem: OK, I got that. Thank you. What about (1) new networks using same bridge and IP subnet as old networks and (2) DHCP leasing broadcast address to VM instance

Two questions now. 1. What would be correct way of adding new networks? "nova-manage network create 10.0.0.0/24 5 32" required some manual cleaning in DB. 2. Is setting reserved flag in fixed_ips OK? If so, shouldn't it be done by nova?


You received this question notification because you are a member of Nova Core, which is an answer contact for OpenStack Compute (nova).

edit flag offensive delete link more
0

answered 2011-02-15 18:48:56 -0500

justin-cinkelj gravatar image

I did that too, but thanks for reminder. So basically no garbage should be left in DB after cleaning tables networks and fixed_ips, right? Because newly created networks get id number, continued from id of just deleted networks. Not that this is a problem, but I thought it is strange.

Problems showed later. After deleting some networks I left only one network:

mysql> select * from networks; +---------------------+---------------------+------------+---------+----+----------+---------------+-----------------+--------+------------+------------+------+------+--------------------+-----------------+---------------------+------------+------------+-----------+---------+-----------+ | created_at | updated_at | deleted_at | deleted | id | injected | cidr | netmask | bridge | gateway | broadcast | dns | vlan | vpn_public_address | vpn_public_port | vpn_private_address | dhcp_start | project_id | host | cidr_v6 | ra_server | +---------------------+---------------------+------------+---------+----+----------+---------------+-----------------+--------+------------+------------+------+------+--------------------+-----------------+---------------------+------------+------------+-----------+---------+-----------+ | 2011-01-28 10:08:00 | 2011-01-28 10:12:43 | NULL | 0 | 1 | 0 | 10.0.0.0/27 | 255.255.255.224 | br100 | 10.0.0.1 | 10.0.0.31 | NULL | 100 | 172.16.120.229 | 1000 | 10.0.0.2 | 10.0.0.3 | xproj | ubuntu04a | NULL | NULL |

New networks were created with nova-manage network create 10.0.0.0/24 5 32 and in DB is:

| 2011-02-14 13:17:12 | NULL | NULL | 0 | 5 | 0 | 10.0.0.32/27 | 255.255.255.224 | br101 | 10.0.0.33 | 10.0.0.63 | NULL | 101 | NULL | 1001 | 10.0.0.34 | 10.0.0.35 | NULL | NULL | NULL | NULL | | 2011-02-14 13:17:12 | NULL | NULL | 0 | 4 | 0 | 10.0.0.0/27 | 255.255.255.224 | br100 | 10.0.0.1 | 10.0.0.31 | NULL | 100 | NULL | 1000 | 10.0.0.2 | 10.0.0.3 | NULL | NULL | NULL | NULL | | 2011-02-14 13:17:12 | NULL | NULL | 0 | 6 | 0 | 10.0.0.64/27 | 255.255.255.224 | br102 | 10.0.0.65 | 10.0.0.95 | NULL | 102 | NULL | 1002 | 10.0.0.66 | 10.0.0.67 | NULL | NULL | NULL | NULL | | 2011-02-14 13:17:12 | NULL | NULL | 0 | 7 | 0 | 10.0.0.96/27 | 255.255.255.224 | br103 | 10.0.0.97 | 10.0.0.127 | NULL | 103 | NULL | 1003 | 10.0.0.98 | 10.0.0.99 | NULL | NULL | NULL | NULL | | 2011-02-14 13:17:12 | NULL | NULL | 0 | 8 | 0 | 10.0.0.128/27 | 255.255.255.224 | br104 | 10.0.0.129 | 10.0.0.159 | NULL | 104 | NULL | 1004 | 10.0.0.130 | 10.0.0.131 | NULL | NULL | NULL | NULL |

First new network has id 4, its IP subnet and bridge overlap with old network with id=1. I'm not sure if this should is a bug or a not-yet-implemented thing. I just removed network with id=4 and corresponding entries in fixed_ips table.

Well, after adding new project, VM instances got IPs from let say 10.0.0.32/27 subnet. But first instance received 10.0.0.63, which is a broadcast address. Looking at DB again:

mysql> select id, address, network_id, instance_id, allocated, leased, reserved from fixed_ips where (network_id=1 OR network_id=10); +-----+-----------+------------+-------------+-----------+--------+----------+ | id | address | network_id | instance_id | allocated | leased | reserved | +-----+-----------+------------+-------------+-----------+--------+----------+ | 1 | 10.0.0.0 | 1 | NULL | 0 | 0 | 1 | | 2 | 10.0.0.1 | 1 | NULL | 0 | 0 | 1 | | 3 | 10.0.0.2 | 1 ... (more)

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2011-02-15 17:08:24 -0500

Seen: 871 times

Last updated: Nov 08 '11