Done. :)

Regards,

Paul Angus
S: +44 20 3603 0540 | M: +447711418784
paul.an...@shapeblue.com

-----Original Message-----
From: Wei ZHOU [mailto:ustcweiz...@gmail.com]
Sent: 13 May 2013 18:38
To: dev@cloudstack.apache.org
Subject: Re: [jira] [Commented] (CLOUDSTACK-2463) CS Upgrade 2.2.14 to 4.1.0 
failed due to no public network found (configuration : advanced network with 
security groups)

Thanks,  Paul.

Could you login to the database and paste the result of the commands Nicolas 
listed in Description?


2013/5/13 Paul Angus (JIRA) <j...@apache.org>

>
>     [
> https://issues.apache.org/jira/browse/CLOUDSTACK-2463?page=com.atlassi
> an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId
> =13656100#comment-13656100]
>
> Paul Angus commented on CLOUDSTACK-2463:
> ----------------------------------------
>
> On a clean build of ACS4.1-SNAPSHOT from 13/05/13 I created an
> advanced zone with security groups.
>
> When attempting to enable the zone I received the following message:
>
> 'Cannot enable this Zone since: Unable to find the default physical
> network with traffic=Public in the specified zone id'
>
> As it was an advanced zone with security groups I didn't get the
> option to add/configure a public network.
>
> > CS Upgrade 2.2.14 to 4.1.0 failed due to no public network found
> (configuration : advanced network with security groups)
> >
> ----------------------------------------------------------------------
> --------------------------------------------------
> >
> >                 Key: CLOUDSTACK-2463
> >                 URL:
> https://issues.apache.org/jira/browse/CLOUDSTACK-2463
> >             Project: CloudStack
> >          Issue Type: Bug
> >      Security Level: Public(Anyone can view this level - this is the
> default.)
> >    Affects Versions: 4.1.0
> >            Reporter: Nicolas Lamirault
> >            Assignee: Wei Zhou
> >            Priority: Blocker
> >             Fix For: 4.1.0
> >
> >
> > According Wei Zhou last patch (
> https://issues.apache.org/jira/browse/CLOUDSTACK-528), i can add a new
> secondary storage. The SSVM creation failed due to :
> > 2013-05-13 15:17:52,868 DEBUG
> [storage.secondary.SecondaryStorageManagerImpl] (secstorage-1:null)
> Zone 1 is ready to launch secondary storage VM
> > 2013-05-13 15:17:52,879 INFO
> [cloud.secstorage.PremiumSecondaryStorageManagerImpl]
> (secstorage-1:null) No running secondary storage vms found in
> datacenter id=1, starting one
> > 2013-05-13 15:17:52,889 INFO
> [storage.secondary.SecondaryStorageManagerImpl] (secstorage-1:null) No
> stopped secondary storage vm is available, need to allocate a new
> secondary storage vm
> > 2013-05-13 15:17:52,894 DEBUG
> [storage.secondary.SecondaryStorageManagerImpl] (secstorage-1:null)
> Assign secondary storage vm from a newly started instance for request
> from data center : 1
> > 2013-05-13 15:17:52,922 WARN [cloud.vm.SystemVmLoadScanner]
> (secstorage-1:null) Unexpected exception Found 22 networks of type
> Guest when expect to find 1
> > com.cloud.utils.exception.CloudRuntimeException: Found 22 networks
> > of
> type Guest when expect to find 1
> >         at
> com.cloud.storage.secondary.SecondaryStorageManagerImpl.createSecStora
> geVmInstance(SecondaryStorageManagerImpl.java:552)
> >         at
> com.cloud.storage.secondary.SecondaryStorageManagerImpl.startNew(Secon
> daryStorageManagerImpl.java:499)
> >         at
> com.cloud.storage.secondary.SecondaryStorageManagerImpl.allocCapacity(
> SecondaryStorageManagerImpl.java:666)
> >         at
> com.cloud.storage.secondary.SecondaryStorageManagerImpl.expandPool(Sec
> ondaryStorageManagerImpl.java:1300)
> >         at
> com.cloud.secstorage.PremiumSecondaryStorageManagerImpl.scanPool(Premi
> umSecondaryStorageManagerImpl.java:121)
> >         at
> com.cloud.secstorage.PremiumSecondaryStorageManagerImpl.scanPool(Premi
> umSecondaryStorageManagerImpl.java:52)
> >         at
> com.cloud.vm.SystemVmLoadScanner.loadScan(SystemVmLoadScanner.java:104
> )
> >         at
> com.cloud.vm.SystemVmLoadScanner.access$100(SystemVmLoadScanner.java:3
> 3)
> >         at
> com.cloud.vm.SystemVmLoadScanner$1.reallyRun(SystemVmLoadScanner.java:
> 81)
> >         at
> com.cloud.vm.SystemVmLoadScanner$1.run(SystemVmLoadScanner.java:72)
> >         at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441
> )
> >         at
> java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:
> 317)
> >         at
> java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
> >         at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.a
> ccess$101(ScheduledThreadPoolExecutor.java:98)
> >         at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.r
> unPeriodic(ScheduledThreadPoolExecutor.java:180)
> >         at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.r
> un(ScheduledThreadPoolExecutor.java:204)
> >         at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecu
> tor.java:886)
> >         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.
> java:908)
> >         at java.lang.Thread.run(Thread.java:662)
> > We try this patch :
> > diff --git
> a/server/src/com/cloud/storage/secondary/SecondaryStorageManagerImpl.j
> ava
> b/server/src/com/cloud/storage/secondary/SecondaryStorageManagerImpl.j
> ava
> > index fca89dc..d40d22f 100755
> > ---
> a/server/src/com/cloud/storage/secondary/SecondaryStorageManagerImpl.j
> ava
> > +++
> b/server/src/com/cloud/storage/secondary/SecondaryStorageManagerImpl.j
> ava
> > @@ -541,7 +541,7 @@ public class SecondaryStorageManagerImpl extends
> ManagerBase implements Secondar
> >          DataCenter dc = _dcDao.findById(plan.getDataCenterId());
> >          TrafficType defaultTrafficType = TrafficType.Public;
> > - if (dc.getNetworkType() == NetworkType.Basic ||
> dc.isSecurityGroupEnabled()) {
> > + if (dc.getNetworkType() == NetworkType.Basic) {
> >                 defaultTrafficType = TrafficType.Guest;
> >          }
> > @@ -1143,7 +1143,7 @@ public class SecondaryStorageManagerImpl
> > extends
> ManagerBase implements Secondar
> >          List<NicProfile> nics = profile.getNics();
> >          for (NicProfile nic : nics) {
> >              if ((nic.getTrafficType() == TrafficType.Public &&
> dc.getNetworkType() == NetworkType.Advanced)
> > - || (nic.getTrafficType() == TrafficType.Guest &&
> > (dc.getNetworkType()
> == NetworkType.Basic || dc.isSecurityGroupEnabled()))) {
> > + || (nic.getTrafficType() == TrafficType.Guest &&
> > + || (dc.getNetworkType()
> == NetworkType.Basic))) {
> >                  secVm.setPublicIpAddress(nic.getIp4Address());
> >                  secVm.setPublicNetmask(nic.getNetmask());
> >                  secVm.setPublicMacAddress(nic.getMacAddress());
> > Then the error :
> > 2013-05-13 16:56:27,084 INFO
> [storage.secondary.SecondaryStorageManagerImpl] (secstorage-1:null) No
> stopped secondary storage vm is available, need to allocate a new
> secondary storage vm
> > 2013-05-13 16:56:27,090 DEBUG
> [storage.secondary.SecondaryStorageManagerImpl] (secstorage-1:null)
> Assign secondary storage vm from a newly started instance for request
> from data center : 1
> > 2013-05-13 16:56:27,126 WARN [cloud.vm.SystemVmLoadScanner]
> (secstorage-1:null) Unexpected exception Found 0 networks of type
> Public when expect to find 1
> > com.cloud.utils.exception.CloudRuntimeException: Found 0 networks of
> type Public when expect to find 1
> >         at
> com.cloud.storage.secondary.SecondaryStorageManagerImpl.createSecStora
> geVmInstance(SecondaryStorageManagerImpl.java:555)
> >         at
> com.cloud.storage.secondary.SecondaryStorageManagerImpl.startNew(Secon
> daryStorageManagerImpl.java:499)
> >         at
> com.cloud.storage.secondary.SecondaryStorageManagerImpl.allocCapacity(
> SecondaryStorageManagerImpl.java:669)
> >         at
> com.cloud.storage.secondary.SecondaryStorageManagerImpl.expandPool(Sec
> ondaryStorageManagerImpl.java:1304)
> >         at
> com.cloud.secstorage.PremiumSecondaryStorageManagerImpl.scanPool(Premi
> umSecondaryStorageManagerImpl.java:121)
> >         at
> com.cloud.secstorage.PremiumSecondaryStorageManagerImpl.scanPool(Premi
> umSecondaryStorageManagerImpl.java:52)
> >         at
> com.cloud.vm.SystemVmLoadScanner.loadScan(SystemVmLoadScanner.java:104
> )
> >         at
> com.cloud.vm.SystemVmLoadScanner.access$100(SystemVmLoadScanner.java:3
> 3)
> >         at
> com.cloud.vm.SystemVmLoadScanner$1.reallyRun(SystemVmLoadScanner.java:
> 81)
> >         at
> com.cloud.vm.SystemVmLoadScanner$1.run(SystemVmLoadScanner.java:72)
> >         at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441
> )
> >         at
> java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:
> 317)
> >         at
> java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
> >         at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.a
> ccess$101(ScheduledThreadPoolExecutor.java:98)
> >         at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.r
> unPeriodic(ScheduledThreadPoolExecutor.java:180)
> >         at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.r
> un(ScheduledThreadPoolExecutor.java:204)
> >         at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecu
> tor.java:886)
> >         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.
> java:908)
> >         at java.lang.Thread.run(Thread.java:662)
> > Into database :
> > select distinct(traffic_type) from networks where data_center_id = 1
> > and
> state <> 'DESTROY';
> > +--------------+
> > | traffic_type |
> > +--------------+
> > | Management |
> > | Control |
> > | Storage |
> > | Guest |
> > +--------------+
> >  select count(*) as nb, traffic_type from networks where
> > data_center_id
> = 1 group by traffic_type;
> > +----+--------------+
> > | nb | traffic_type |
> > +----+--------------+
> > | 1 | Control |
> > | 25 | Guest |
> > | 1 | Management |
> > | 1 | Storage |
> > +----+--------------+
> > In our CS 2.2.13, we've got this configuration :
> > select distinct(traffic_type) from networks where data_center_id = 1
> > and
> state <> 'DESTROY';
> > +--------------+
> > | traffic_type |
> > +--------------+
> > | Management |
> > | Control |
> > | Storage |
> > | Guest |
> > +--------------+
> > select count(*) as nb, traffic_type from networks where
> > data_center_id =
> 1 group by traffic_type;
> > +-----+--------------+
> > | nb | traffic_type |
> > +-----+--------------+
> > | 1 | Control |
> > | 362 | Guest |
> > | 1 | Management |
> > | 1 | Storage |
> > +-----+--------------+
>
> --
> 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
>
This email and any attachments to it may be confidential and are intended 
solely for the use of the individual to whom it is addressed. Any views or 
opinions expressed are solely those of the author and do not necessarily 
represent those of Shape Blue Ltd or related companies. If you are not the 
intended recipient of this email, you must neither take any action based upon 
its contents, nor copy or show it to anyone. Please contact the sender if you 
believe you have received this email in error. Shape Blue Ltd is a company 
incorporated in England & Wales. ShapeBlue Services India LLP is operated under 
license from Shape Blue Ltd. ShapeBlue is a registered trademark.

Reply via email to