Return-Path: X-Original-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D85DED98A for ; Fri, 22 Jun 2012 17:07:03 +0000 (UTC) Received: (qmail 77531 invoked by uid 500); 22 Jun 2012 17:07:03 -0000 Delivered-To: apmail-incubator-cloudstack-dev-archive@incubator.apache.org Received: (qmail 77508 invoked by uid 500); 22 Jun 2012 17:07:03 -0000 Mailing-List: contact cloudstack-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-dev@incubator.apache.org Received: (qmail 77499 invoked by uid 99); 22 Jun 2012 17:07:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jun 2012 17:07:03 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of spinolacastro@gmail.com designates 74.125.83.47 as permitted sender) Received: from [74.125.83.47] (HELO mail-ee0-f47.google.com) (74.125.83.47) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jun 2012 17:06:58 +0000 Received: by eekd49 with SMTP id d49so676208eek.6 for ; Fri, 22 Jun 2012 10:06:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=Mkz5qz9bY+yoJ9D3nu42qoIBZQMuJSnU+62oE5MT1P0=; b=bfSImaLaQwtGpt7sonVnE3WSx+nyWuw82EBGT7y2vR+4hEvoGCg7Hw8EmP7s4s28f0 HuCkUpq+ivm3MXimPUDssaBdkxviqFWIFczdZTLFrLCY0YqP89xbPuyxYVLpUKn4wGrB G6jQt2CcHlxnwJkwWOI8R7Xz98jn5FIyTGkVsIi4Iy56g7lzCXV3YaEMOKevXMCYtbOY gavAtfI5dZOy1eTTibLKouNFzEx5UGtU+S/Hnt8CVjqV0QpA97X0l0JocwyOC6Go3r2W CjWPrZBa7rVt6sx/mkGY3FPtMsr90G8VfOAjIEwWitUuF6OYav6XmQtgBE2byo+CwtQu ladA== MIME-Version: 1.0 Received: by 10.14.98.204 with SMTP id v52mr581438eef.199.1340384797394; Fri, 22 Jun 2012 10:06:37 -0700 (PDT) Received: by 10.14.224.66 with HTTP; Fri, 22 Jun 2012 10:06:37 -0700 (PDT) In-Reply-To: References: Date: Fri, 22 Jun 2012 14:06:37 -0300 Message-ID: Subject: Re: Private IP allocation From: Diego Spinola Castro To: cloudstack-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=bcaec52161ebb605ef04c312a793 X-Virus-Checked: Checked by ClamAV on apache.org --bcaec52161ebb605ef04c312a793 Content-Type: text/plain; charset=ISO-8859-1 Worked! Tks Alena. 2012/6/22 Alena Prokharchyk > You need to mark them as free: > > > Update op_dc_address_alloc set nic_id=null, reservation_id=null, > taken=null where id in (list of ids of orphaned nics) > > > > -Alena. > > On 6/22/12 9:58 AM, "Diego Spinola Castro" > wrote: > > >Alena, i did what you said. > >Now i have a few orphan ips, what should i do with they? > > > >mysql> SELECT * FROM op_dc_ip_address_alloc a WHERE a.nic_id IS NOT NULL > >AND (SELECT COUNT(*) FROM op_dc_ip_address_alloc b WHERE a.nic_id = > >b.nic_id)>1 order by nic_id; > >+-----+---------------+----------------+--------+--------+---------------- > >----------------------+---------------------+-------------+ > >| id | ip_address | data_center_id | pod_id | nic_id | > >reservation_id | taken | mac_address | > >+-----+---------------+----------------+--------+--------+---------------- > >----------------------+---------------------+-------------+ > >| 132 | 10.16.140.171 | 1 | 1 | 297 | > >4d93bc69-0ead-44ae-b603-ca7c04a537b2 | 2012-05-16 04:09:11 | 132 | > >| 158 | 10.16.140.197 | 1 | 1 | 297 | > >2d23e82a-9f03-44a9-9a5b-3d80a85852c5 | 2012-05-08 20:46:26 | 158 | > >| 156 | 10.16.140.195 | 1 | 1 | 371 | > >938f1442-4ab7-4805-8bcf-6099a1b6ffba | 2012-05-08 18:50:01 | 156 | > >| 147 | 10.16.140.186 | 1 | 1 | 371 | > >e8e066db-f32d-470e-814b-7c34c28dc1a7 | 2012-05-16 03:43:19 | 147 | > >| 3 | 10.16.140.42 | 1 | 1 | 424 | > >11ef45ec-ba3c-496d-93d5-a981b67c36f7 | 2012-05-16 02:53:20 | 3 | > >| 6 | 10.16.140.45 | 1 | 1 | 424 | > >6d7c38cf-4d72-4415-8aee-9e2a7519e9b9 | 2012-05-15 14:14:19 | 6 | > >| 47 | 10.16.140.86 | 1 | 1 | 465 | > >24d44b22-9934-4d42-8e3b-eefe1c167463 | 2012-05-16 03:05:05 | 47 | > >| 199 | 10.16.140.238 | 1 | 1 | 465 | > >4ac97f51-f657-4d8e-b988-00c94a0c2deb | 2012-05-08 21:01:05 | 199 | > >| 76 | 10.16.140.115 | 1 | 1 | 507 | > >0896819a-0227-41bc-94bf-3412c20dc233 | 2012-05-08 19:40:20 | 76 | > >| 23 | 10.16.140.62 | 1 | 1 | 507 | > >a9efa297-7008-4acd-b11d-cad4be7560fc | 2012-05-16 04:09:14 | 23 | > >| 24 | 10.16.140.63 | 1 | 1 | 552 | > >c28f8b3f-a889-4274-aa7b-8940055a8be7 | 2012-05-08 19:56:45 | 24 | > >| 192 | 10.16.140.231 | 1 | 1 | 552 | > >44b764c7-a196-4fbe-9db3-97bda3b29422 | 2012-05-16 04:38:36 | 192 | > >| 71 | 10.16.140.110 | 1 | 1 | 568 | > >069b5719-2134-47b6-b4f4-4e9881cd92d4 | 2012-05-16 02:53:15 | 71 | > >| 144 | 10.16.140.183 | 1 | 1 | 568 | > >72b7ff9d-64eb-46f9-8900-2005b1376b00 | 2012-05-08 17:28:26 | 144 | > >+-----+---------------+----------------+--------+--------+---------------- > >----------------------+---------------------+-------------+ > >14 rows in set (0.01 sec) > > > >mysql> select ip4_address from nics where id in > >(297,371,424,465,507,552,568); > >+-------------+ > >| ip4_address | > >+-------------+ > >| NULL | > >+-------------+ > >1 row in set (0.00 sec) > > > > > > > >Diego > > > > > >2012/6/18 Alena Prokharchyk > > > >> On 6/18/12 6:36 AM, "Diego Spinola Castro" > >> wrote: > >> > >> >Hi, i have a vsphere and xenserver cluster in same pod with cs 2.2.13. > >> > > >> >Looking in resources dashboard i figured out that there a lot of > >>private > >> >ips allocated and it is incompatible with systemvm's number. > >> > > >> >i don't know what caused it but op_dc_ipaddress_alloc has at least > >>three > >> >private ip for system vm. > >> > > >> > > >> >mysql> select * from op_dc_ip_address_alloc where nic_id = 269; > >> > >>>+-----+---------------+----------------+--------+--------+-------------- > >>>-- > >> >----------------------+---------------------+-------------+ > >> >| id | ip_address | data_center_id | pod_id | nic_id | > >> >reservation_id | taken | > >>mac_address | > >> > >>>+-----+---------------+----------------+--------+--------+-------------- > >>>-- > >> >----------------------+---------------------+-------------+ > >> >| 125 | 10.16.140.164 | 1 | 1 | 269 | > >> >c1ea70fc-ed28-4c25-b2c9-ac8c4b7abf88 | 2012-05-16 03:43:59 | > >>125 | > >> >| 151 | 10.16.140.190 | 1 | 1 | 269 | > >> >d31d08dc-e3dc-44a5-ba65-fe5984e72a9e | 2012-05-08 18:50:07 | > >>151 | > >> >| 160 | 10.16.140.199 | 1 | 1 | 269 | > >> >019d4b39-534b-4a6e-a02f-99618f20b96a | 2012-06-09 15:54:10 | > >>160 | > >> > >>>+-----+---------------+----------------+--------+--------+-------------- > >>>-- > >> >----------------------+---------------------+-------------+ > >> > > >> > > >> > > >> >Any thoughts? > >> > > >> > >> > >> > >> Diego, looks similar to this problem: > >> > >> http://bugs.cloudstack.org/browse/CS-14433 - multiple ip addresses are > >> allocated for the same nic. > >> > >> > >> > >> The bug was supposed to be fixed in 3.0.2 build. I see that you are in > >> 2.2.13, so here is the way to workaround the problem: > >> > >> > >> * verify which ip address is really used by nic id=269: > >> > >> Select ip4_address from nics where id=269 > >> > >> * mark all the rest of the private ips as free > >> > >> Update op_dc_address_alloc set nic_id=null, reservation_id=null, > >> taken=null where id in (list of ids) > >> > >> > >> > >> -Alena. > >> > >> > > > > > --bcaec52161ebb605ef04c312a793--