Re: Where to look when your SSVM creation NPE's?

2018-10-18 Thread Boris Stoyanov
2018-10-18 06:20:26,076 INFO  [o.a.c.s.SecondaryStorageManagerImpl] 
(secstorage-1:ctx-70aba7ab) (logid:f3c51c51) Unable to start secondary storage 
vm for standby capacity, vm id : 346, will recycle it and start a new one
2018-10-18 06:20:26,095 INFO  [o.a.c.s.PremiumSecondaryStorageManagerImpl] 
(secstorage-1:ctx-70aba7ab) (logid:f3c51c51) Primary secondary storage is not 
even started, wait until next turn

Looks like you have an issue with secondary storage, can you check status/add 
it again and troubleshoot it?

Bobby. 



boris.stoya...@shapeblue.com 
www.shapeblue.com
Amadeus House, Floral Street, London  WC2E 9DPUK
@shapeblue
  
 

> On 19 Oct 2018, at 0:23, Jordan Michaels  wrote:
> 
> Hi Si,
> 
> Thanks so much for the follow-up!
> 
>> Could you tell us a bit more about your setup?
> 
> I've got a little lab setup, with a dedicated router, switch, and several 
> 1U's that I can test with. Will eventually set up a little micro-environment 
> with VLAN's and such but for now just trying to get things working - which is 
> turning out to be much more difficult than it sounds.
> 
>> Hypervisor Type?
> 
> KVM for now
> 
>> Network design (basic or advanced)?
> 
> Basic; using a single 192.168.253.0/24 range for the various networks similar 
> to what's shown here:
> http://docs.cloudstack.apache.org/en/4.11.1.0/installguide/hypervisor/kvm.html#configuring-the-networking
> 
> I've got the two bridges set up with the management IP assigned to cloudbr0 
> and no ip assigned to cloudbr1.
> 
>> Primary storage type?
> 
> I've tried NFS and local, though the result is the same regardless.
> 
>> CloudStack version?
> 
> 4.11
> 
>> OS being used?
> 
> CentOS 7
> 
> More than just getting it working, I'd like to know where to find out what 
> error is actually occurring here. I want to understand the details.
> 
> I'm guessing the NPE is because the API was expecting to get something back 
> from the storage server and it didn't? Is the command that was sent logged 
> anywhere? What about the result? If the command that was sent to the storage 
> server threw an error, is there a way that I can see what the error was 
> specifically?
> 
> Thanks so much for your time. I really appreciate it.
> 
> --
> Kind regards,
> Jordan Michaels
> Vivio Technologies
> 
> - Original Message -
> From: "Simon Weller" 
> To: "users" , "jordan" 
> Sent: Thursday, 18 October, 2018 13:14:41
> Subject: Re: Where to look when your SSVM creation NPE's?
> 
> Jordan,
> 
> 
> Could you tell us a bit more about your setup?
> 
> Hypervisor Type? Network design (basic or advanced)? Primary storage type? 
> CloudStack version? OS being used?
> 
> - Si
> 
> From: Jordan Michaels 
> Sent: Thursday, October 18, 2018 2:26 PM
> To: users
> Subject: Where to look when your SSVM creation NPE's?
> 
> Hi Folks,
> 
> I've added a host to the CloudStack Management server but now I'm getting 
> NPE's when the Management server tries to create the System VM's:
> 
> 2018-10-18 06:20:26,052 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] 
> (Work-Job-Executor-40:ctx-ac017e0e job-1248/job-1621) (logid:b6f3dd96) Done 
> executing com.cloud.vm.VmWorkStart for job-1621
> 2018-10-18 06:20:26,054 INFO  [o.a.c.f.j.i.AsyncJobMonitor] 
> (Work-Job-Executor-40:ctx-ac017e0e job-1248/job-1621) (logid:b6f3dd96) Remove 
> job-1621 from job monitoring
> 2018-10-18 06:20:26,073 WARN  [o.a.c.s.SecondaryStorageManagerImpl] 
> (secstorage-1:ctx-70aba7ab) (logid:f3c51c51) Exception while trying to start 
> secondary storage vm
> java.lang.NullPointerException
>at 
> com.cloud.network.guru.DirectPodBasedNetworkGuru$2.doInTransactionWithoutResult(DirectPodBasedNetworkGuru.java:183)
>at 
> com.cloud.utils.db.TransactionCallbackWithExceptionNoReturn.doInTransaction(TransactionCallbackWithExceptionNoReturn.java:25)
>at 
> com.cloud.utils.db.TransactionCallbackWithExceptionNoReturn.doInTransaction(TransactionCallbackWithExceptionNoReturn.java:21)
>at com.cloud.utils.db.Transaction.execute(Transaction.java:40)
>at 
> com.cloud.network.guru.DirectPodBasedNetworkGuru.getIp(DirectPodBasedNetworkGuru.java:173)
>at 
> com.cloud.network.guru.DirectPodBasedNetworkGuru.reserve(DirectPodBasedNetworkGuru.java:161)
>at 
> org.apache.cloudstack.engine.orchestration.NetworkOrchestrator.prepareNic(NetworkOrchestrator.java:1594)
>at 
> org.apache.cloudstack.engine.orchestration.NetworkOrchestrator.prepare(NetworkOrchestrator.java:1565)
>at 
> com.cloud.vm.VirtualMachineManagerImpl.orchestrateStart(VirtualMachineManagerImpl.java:)
>at 
> com.cloud.vm.VirtualMachineManagerImpl.orchestrateStart(VirtualMachineManagerImpl.java:4930)
>at sun.reflect.GeneratedMethodAccessor155.invoke(Unknown Source)
>at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>at java.lang.reflect.Method.invoke(Method.java:498)
>at 
> 

Re: Where to look when your SSVM creation NPE's?

2018-10-18 Thread Jordan Michaels
Hi Si,

Thanks so much for the follow-up!

> Could you tell us a bit more about your setup?

I've got a little lab setup, with a dedicated router, switch, and several 1U's 
that I can test with. Will eventually set up a little micro-environment with 
VLAN's and such but for now just trying to get things working - which is 
turning out to be much more difficult than it sounds.

> Hypervisor Type?

KVM for now

> Network design (basic or advanced)?

Basic; using a single 192.168.253.0/24 range for the various networks similar 
to what's shown here:
http://docs.cloudstack.apache.org/en/4.11.1.0/installguide/hypervisor/kvm.html#configuring-the-networking

I've got the two bridges set up with the management IP assigned to cloudbr0 and 
no ip assigned to cloudbr1.

> Primary storage type?

I've tried NFS and local, though the result is the same regardless.

> CloudStack version?

4.11

> OS being used?

CentOS 7

More than just getting it working, I'd like to know where to find out what 
error is actually occurring here. I want to understand the details.

I'm guessing the NPE is because the API was expecting to get something back 
from the storage server and it didn't? Is the command that was sent logged 
anywhere? What about the result? If the command that was sent to the storage 
server threw an error, is there a way that I can see what the error was 
specifically?

Thanks so much for your time. I really appreciate it.

--
Kind regards,
Jordan Michaels
Vivio Technologies

- Original Message -
From: "Simon Weller" 
To: "users" , "jordan" 
Sent: Thursday, 18 October, 2018 13:14:41
Subject: Re: Where to look when your SSVM creation NPE's?

Jordan,


Could you tell us a bit more about your setup?

Hypervisor Type? Network design (basic or advanced)? Primary storage type? 
CloudStack version? OS being used?

- Si

From: Jordan Michaels 
Sent: Thursday, October 18, 2018 2:26 PM
To: users
Subject: Where to look when your SSVM creation NPE's?

Hi Folks,

I've added a host to the CloudStack Management server but now I'm getting NPE's 
when the Management server tries to create the System VM's:

2018-10-18 06:20:26,052 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] 
(Work-Job-Executor-40:ctx-ac017e0e job-1248/job-1621) (logid:b6f3dd96) Done 
executing com.cloud.vm.VmWorkStart for job-1621
2018-10-18 06:20:26,054 INFO  [o.a.c.f.j.i.AsyncJobMonitor] 
(Work-Job-Executor-40:ctx-ac017e0e job-1248/job-1621) (logid:b6f3dd96) Remove 
job-1621 from job monitoring
2018-10-18 06:20:26,073 WARN  [o.a.c.s.SecondaryStorageManagerImpl] 
(secstorage-1:ctx-70aba7ab) (logid:f3c51c51) Exception while trying to start 
secondary storage vm
java.lang.NullPointerException
at 
com.cloud.network.guru.DirectPodBasedNetworkGuru$2.doInTransactionWithoutResult(DirectPodBasedNetworkGuru.java:183)
at 
com.cloud.utils.db.TransactionCallbackWithExceptionNoReturn.doInTransaction(TransactionCallbackWithExceptionNoReturn.java:25)
at 
com.cloud.utils.db.TransactionCallbackWithExceptionNoReturn.doInTransaction(TransactionCallbackWithExceptionNoReturn.java:21)
at com.cloud.utils.db.Transaction.execute(Transaction.java:40)
at 
com.cloud.network.guru.DirectPodBasedNetworkGuru.getIp(DirectPodBasedNetworkGuru.java:173)
at 
com.cloud.network.guru.DirectPodBasedNetworkGuru.reserve(DirectPodBasedNetworkGuru.java:161)
at 
org.apache.cloudstack.engine.orchestration.NetworkOrchestrator.prepareNic(NetworkOrchestrator.java:1594)
at 
org.apache.cloudstack.engine.orchestration.NetworkOrchestrator.prepare(NetworkOrchestrator.java:1565)
at 
com.cloud.vm.VirtualMachineManagerImpl.orchestrateStart(VirtualMachineManagerImpl.java:)
at 
com.cloud.vm.VirtualMachineManagerImpl.orchestrateStart(VirtualMachineManagerImpl.java:4930)
at sun.reflect.GeneratedMethodAccessor155.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at 
com.cloud.vm.VmWorkJobHandlerProxy.handleVmWorkJob(VmWorkJobHandlerProxy.java:107)
at 
com.cloud.vm.VirtualMachineManagerImpl.handleVmWorkJob(VirtualMachineManagerImpl.java:5093)
at com.cloud.vm.VmWorkJobDispatcher.runJob(VmWorkJobDispatcher.java:102)
at 
org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:581)
at 
org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:49)
at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
at 

Re: Where to look when your SSVM creation NPE's?

2018-10-18 Thread Andrija Panic
Can you please make sure that the Agent is up and running - check agent
logs etc ?
This has nothing to do with "SSVM cant talk to Secondary Storage" (actually
this can be checked/tested with existing script from inside SSVM, once SSVM
has been started)

It might be capacity issue (though it's usually reported nicely) or perhaps
KVM host can't access Primary Storage.

You did preseed systemVM template as in the guide, right ?

Please share versions, as Simon suggested.

Thx

On Thu, 18 Oct 2018 at 22:15, Simon Weller  wrote:

> Jordan,
>
>
> Could you tell us a bit more about your setup?
>
> Hypervisor Type? Network design (basic or advanced)? Primary storage type?
> CloudStack version? OS being used?
>
> - Si
> 
> From: Jordan Michaels 
> Sent: Thursday, October 18, 2018 2:26 PM
> To: users
> Subject: Where to look when your SSVM creation NPE's?
>
> Hi Folks,
>
> I've added a host to the CloudStack Management server but now I'm getting
> NPE's when the Management server tries to create the System VM's:
>
> 2018-10-18 06:20:26,052 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl]
> (Work-Job-Executor-40:ctx-ac017e0e job-1248/job-1621) (logid:b6f3dd96) Done
> executing com.cloud.vm.VmWorkStart for job-1621
> 2018-10-18 06:20:26,054 INFO  [o.a.c.f.j.i.AsyncJobMonitor]
> (Work-Job-Executor-40:ctx-ac017e0e job-1248/job-1621) (logid:b6f3dd96)
> Remove job-1621 from job monitoring
> 2018-10-18 06:20:26,073 WARN  [o.a.c.s.SecondaryStorageManagerImpl]
> (secstorage-1:ctx-70aba7ab) (logid:f3c51c51) Exception while trying to
> start secondary storage vm
> java.lang.NullPointerException
> at
> com.cloud.network.guru.DirectPodBasedNetworkGuru$2.doInTransactionWithoutResult(DirectPodBasedNetworkGuru.java:183)
> at
> com.cloud.utils.db.TransactionCallbackWithExceptionNoReturn.doInTransaction(TransactionCallbackWithExceptionNoReturn.java:25)
> at
> com.cloud.utils.db.TransactionCallbackWithExceptionNoReturn.doInTransaction(TransactionCallbackWithExceptionNoReturn.java:21)
> at com.cloud.utils.db.Transaction.execute(Transaction.java:40)
> at
> com.cloud.network.guru.DirectPodBasedNetworkGuru.getIp(DirectPodBasedNetworkGuru.java:173)
> at
> com.cloud.network.guru.DirectPodBasedNetworkGuru.reserve(DirectPodBasedNetworkGuru.java:161)
> at
> org.apache.cloudstack.engine.orchestration.NetworkOrchestrator.prepareNic(NetworkOrchestrator.java:1594)
> at
> org.apache.cloudstack.engine.orchestration.NetworkOrchestrator.prepare(NetworkOrchestrator.java:1565)
> at
> com.cloud.vm.VirtualMachineManagerImpl.orchestrateStart(VirtualMachineManagerImpl.java:)
> at
> com.cloud.vm.VirtualMachineManagerImpl.orchestrateStart(VirtualMachineManagerImpl.java:4930)
> at sun.reflect.GeneratedMethodAccessor155.invoke(Unknown Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at
> com.cloud.vm.VmWorkJobHandlerProxy.handleVmWorkJob(VmWorkJobHandlerProxy.java:107)
> at
> com.cloud.vm.VirtualMachineManagerImpl.handleVmWorkJob(VirtualMachineManagerImpl.java:5093)
> at
> com.cloud.vm.VmWorkJobDispatcher.runJob(VmWorkJobDispatcher.java:102)
> at
> org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:581)
> at
> org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:49)
> at
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
> at
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
> at
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
> at
> org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:46)
> at
> org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.run(AsyncJobManagerImpl.java:529)
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)
> 2018-10-18 06:20:26,076 INFO  [o.a.c.s.SecondaryStorageManagerImpl]
> (secstorage-1:ctx-70aba7ab) (logid:f3c51c51) Unable to start secondary
> storage vm for standby capacity, vm id : 346, will recycle it and start a
> new one
> 2018-10-18 06:20:26,076 DEBUG [c.c.a.SecondaryStorageVmAlertAdapter]
> (secstorage-1:ctx-70aba7ab) (logid:f3c51c51) received secondary storage vm
> alert
> 2018-10-18 06:20:26,076 DEBUG [c.c.a.SecondaryStorageVmAlertAdapter]
> 

Re: New SSVM wont start after upgrade from 4.9.3 to 4.11.2rc3

2018-10-18 Thread Rohit Yadav
Hi Jean-Francois,


Did you upgrade your KVM agent and restart it as well? The systemvmtemplate 
seems find but it may be possible that an older systemvm.iso has patched the 
systemvm which is why you're seeing the error.


- Rohit






From: Jean-Francois Nadeau 
Sent: Friday, October 19, 2018 2:13:16 AM
To: users@cloudstack.apache.org
Subject: New SSVM wont start after upgrade from 4.9.3 to 4.11.2rc3

hi all,

After upgrading from 4.9.3 to 4.11.2rc3 on centos7/KVM,  the old SSMV were
running and working fine until I destroyed them to get them on the current
version (I uploaded the 4.11.2rc3 template before the upgrade)

Now whatever I do there's nothing running on the new Console proxy VM

Oct 18 20:30:53 v-15-VM systemd[1]: Starting /etc/rc.local Compatibility...
Oct 18 20:30:53 v-15-VM systemd[788]: rc-local.service: Failed at step EXEC
spawning /etc/rc.local: Exec format error
Oct 18 20:30:53 v-15-VM systemd[783]: cloud.service: Failed at step CHROOT
spawning /usr/local/cloud/systemvm/_run.sh: No such file or directory

root@v-15-VM:~# systemctl status cloud --no-pager -l
● cloud.service - CloudStack Agent service
   Loaded: loaded (/etc/systemd/system/cloud.service; enabled; vendor
preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Thu
2018-10-18 20:36:45 UTC; 881ms ago
  Process: 1244 ExecStart=/usr/local/cloud/systemvm/_run.sh (code=exited,
status=210/CHROOT)
 Main PID: 1244 (code=exited, status=210/CHROOT)

Oct 18 20:36:45 v-15-VM systemd[1]: cloud.service: Unit entered failed
state.
Oct 18 20:36:45 v-15-VM systemd[1]: cloud.service: Failed with result
'exit-code'.


I that systemvm build valid ?

root@v-15-VM:~# cat /etc/cloudstack-release
Cloudstack Release 4.11.2 Wed Oct 17 19:09:25 UTC 2018

thanks !

rohit.ya...@shapeblue.com 
www.shapeblue.com
Amadeus House, Floral Street, London  WC2E 9DPUK
@shapeblue
  
 



New SSVM wont start after upgrade from 4.9.3 to 4.11.2rc3

2018-10-18 Thread Jean-Francois Nadeau
hi all,

After upgrading from 4.9.3 to 4.11.2rc3 on centos7/KVM,  the old SSMV were
running and working fine until I destroyed them to get them on the current
version (I uploaded the 4.11.2rc3 template before the upgrade)

Now whatever I do there's nothing running on the new Console proxy VM

Oct 18 20:30:53 v-15-VM systemd[1]: Starting /etc/rc.local Compatibility...
Oct 18 20:30:53 v-15-VM systemd[788]: rc-local.service: Failed at step EXEC
spawning /etc/rc.local: Exec format error
Oct 18 20:30:53 v-15-VM systemd[783]: cloud.service: Failed at step CHROOT
spawning /usr/local/cloud/systemvm/_run.sh: No such file or directory

root@v-15-VM:~# systemctl status cloud --no-pager -l
● cloud.service - CloudStack Agent service
   Loaded: loaded (/etc/systemd/system/cloud.service; enabled; vendor
preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Thu
2018-10-18 20:36:45 UTC; 881ms ago
  Process: 1244 ExecStart=/usr/local/cloud/systemvm/_run.sh (code=exited,
status=210/CHROOT)
 Main PID: 1244 (code=exited, status=210/CHROOT)

Oct 18 20:36:45 v-15-VM systemd[1]: cloud.service: Unit entered failed
state.
Oct 18 20:36:45 v-15-VM systemd[1]: cloud.service: Failed with result
'exit-code'.


I that systemvm build valid ?

root@v-15-VM:~# cat /etc/cloudstack-release
Cloudstack Release 4.11.2 Wed Oct 17 19:09:25 UTC 2018

thanks !


Re: Where to look when your SSVM creation NPE's?

2018-10-18 Thread Simon Weller
Jordan,


Could you tell us a bit more about your setup?

Hypervisor Type? Network design (basic or advanced)? Primary storage type? 
CloudStack version? OS being used?

- Si

From: Jordan Michaels 
Sent: Thursday, October 18, 2018 2:26 PM
To: users
Subject: Where to look when your SSVM creation NPE's?

Hi Folks,

I've added a host to the CloudStack Management server but now I'm getting NPE's 
when the Management server tries to create the System VM's:

2018-10-18 06:20:26,052 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] 
(Work-Job-Executor-40:ctx-ac017e0e job-1248/job-1621) (logid:b6f3dd96) Done 
executing com.cloud.vm.VmWorkStart for job-1621
2018-10-18 06:20:26,054 INFO  [o.a.c.f.j.i.AsyncJobMonitor] 
(Work-Job-Executor-40:ctx-ac017e0e job-1248/job-1621) (logid:b6f3dd96) Remove 
job-1621 from job monitoring
2018-10-18 06:20:26,073 WARN  [o.a.c.s.SecondaryStorageManagerImpl] 
(secstorage-1:ctx-70aba7ab) (logid:f3c51c51) Exception while trying to start 
secondary storage vm
java.lang.NullPointerException
at 
com.cloud.network.guru.DirectPodBasedNetworkGuru$2.doInTransactionWithoutResult(DirectPodBasedNetworkGuru.java:183)
at 
com.cloud.utils.db.TransactionCallbackWithExceptionNoReturn.doInTransaction(TransactionCallbackWithExceptionNoReturn.java:25)
at 
com.cloud.utils.db.TransactionCallbackWithExceptionNoReturn.doInTransaction(TransactionCallbackWithExceptionNoReturn.java:21)
at com.cloud.utils.db.Transaction.execute(Transaction.java:40)
at 
com.cloud.network.guru.DirectPodBasedNetworkGuru.getIp(DirectPodBasedNetworkGuru.java:173)
at 
com.cloud.network.guru.DirectPodBasedNetworkGuru.reserve(DirectPodBasedNetworkGuru.java:161)
at 
org.apache.cloudstack.engine.orchestration.NetworkOrchestrator.prepareNic(NetworkOrchestrator.java:1594)
at 
org.apache.cloudstack.engine.orchestration.NetworkOrchestrator.prepare(NetworkOrchestrator.java:1565)
at 
com.cloud.vm.VirtualMachineManagerImpl.orchestrateStart(VirtualMachineManagerImpl.java:)
at 
com.cloud.vm.VirtualMachineManagerImpl.orchestrateStart(VirtualMachineManagerImpl.java:4930)
at sun.reflect.GeneratedMethodAccessor155.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at 
com.cloud.vm.VmWorkJobHandlerProxy.handleVmWorkJob(VmWorkJobHandlerProxy.java:107)
at 
com.cloud.vm.VirtualMachineManagerImpl.handleVmWorkJob(VirtualMachineManagerImpl.java:5093)
at com.cloud.vm.VmWorkJobDispatcher.runJob(VmWorkJobDispatcher.java:102)
at 
org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:581)
at 
org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:49)
at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
at 
org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:46)
at 
org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.run(AsyncJobManagerImpl.java:529)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
2018-10-18 06:20:26,076 INFO  [o.a.c.s.SecondaryStorageManagerImpl] 
(secstorage-1:ctx-70aba7ab) (logid:f3c51c51) Unable to start secondary storage 
vm for standby capacity, vm id : 346, will recycle it and start a new one
2018-10-18 06:20:26,076 DEBUG [c.c.a.SecondaryStorageVmAlertAdapter] 
(secstorage-1:ctx-70aba7ab) (logid:f3c51c51) received secondary storage vm alert
2018-10-18 06:20:26,076 DEBUG [c.c.a.SecondaryStorageVmAlertAdapter] 
(secstorage-1:ctx-70aba7ab) (logid:f3c51c51) Secondary Storage Vm creation 
failure, zone: lab
2018-10-18 06:20:26,077 WARN  [o.a.c.alerts] (secstorage-1:ctx-70aba7ab) 
(logid:f3c51c51) AlertType:: 19 | dataCenterId:: 1 | podId:: null | clusterId:: 
null | message:: Secondary Storage Vm creation failure. zone: lab, error 
details: null
2018-10-18 06:20:26,095 INFO  [o.a.c.s.PremiumSecondaryStorageManagerImpl] 
(secstorage-1:ctx-70aba7ab) (logid:f3c51c51) Primary secondary storage is not 
even started, wait until next turn

Based on the error, it sounds like there's an issue with the SSVM being able to 
communicate with secondary storage, but I don't know where to 

Where to look when your SSVM creation NPE's?

2018-10-18 Thread Jordan Michaels
Hi Folks,

I've added a host to the CloudStack Management server but now I'm getting NPE's 
when the Management server tries to create the System VM's:

2018-10-18 06:20:26,052 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] 
(Work-Job-Executor-40:ctx-ac017e0e job-1248/job-1621) (logid:b6f3dd96) Done 
executing com.cloud.vm.VmWorkStart for job-1621
2018-10-18 06:20:26,054 INFO  [o.a.c.f.j.i.AsyncJobMonitor] 
(Work-Job-Executor-40:ctx-ac017e0e job-1248/job-1621) (logid:b6f3dd96) Remove 
job-1621 from job monitoring
2018-10-18 06:20:26,073 WARN  [o.a.c.s.SecondaryStorageManagerImpl] 
(secstorage-1:ctx-70aba7ab) (logid:f3c51c51) Exception while trying to start 
secondary storage vm
java.lang.NullPointerException
at 
com.cloud.network.guru.DirectPodBasedNetworkGuru$2.doInTransactionWithoutResult(DirectPodBasedNetworkGuru.java:183)
at 
com.cloud.utils.db.TransactionCallbackWithExceptionNoReturn.doInTransaction(TransactionCallbackWithExceptionNoReturn.java:25)
at 
com.cloud.utils.db.TransactionCallbackWithExceptionNoReturn.doInTransaction(TransactionCallbackWithExceptionNoReturn.java:21)
at com.cloud.utils.db.Transaction.execute(Transaction.java:40)
at 
com.cloud.network.guru.DirectPodBasedNetworkGuru.getIp(DirectPodBasedNetworkGuru.java:173)
at 
com.cloud.network.guru.DirectPodBasedNetworkGuru.reserve(DirectPodBasedNetworkGuru.java:161)
at 
org.apache.cloudstack.engine.orchestration.NetworkOrchestrator.prepareNic(NetworkOrchestrator.java:1594)
at 
org.apache.cloudstack.engine.orchestration.NetworkOrchestrator.prepare(NetworkOrchestrator.java:1565)
at 
com.cloud.vm.VirtualMachineManagerImpl.orchestrateStart(VirtualMachineManagerImpl.java:)
at 
com.cloud.vm.VirtualMachineManagerImpl.orchestrateStart(VirtualMachineManagerImpl.java:4930)
at sun.reflect.GeneratedMethodAccessor155.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at 
com.cloud.vm.VmWorkJobHandlerProxy.handleVmWorkJob(VmWorkJobHandlerProxy.java:107)
at 
com.cloud.vm.VirtualMachineManagerImpl.handleVmWorkJob(VirtualMachineManagerImpl.java:5093)
at com.cloud.vm.VmWorkJobDispatcher.runJob(VmWorkJobDispatcher.java:102)
at 
org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:581)
at 
org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:49)
at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
at 
org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:46)
at 
org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.run(AsyncJobManagerImpl.java:529)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
2018-10-18 06:20:26,076 INFO  [o.a.c.s.SecondaryStorageManagerImpl] 
(secstorage-1:ctx-70aba7ab) (logid:f3c51c51) Unable to start secondary storage 
vm for standby capacity, vm id : 346, will recycle it and start a new one
2018-10-18 06:20:26,076 DEBUG [c.c.a.SecondaryStorageVmAlertAdapter] 
(secstorage-1:ctx-70aba7ab) (logid:f3c51c51) received secondary storage vm alert
2018-10-18 06:20:26,076 DEBUG [c.c.a.SecondaryStorageVmAlertAdapter] 
(secstorage-1:ctx-70aba7ab) (logid:f3c51c51) Secondary Storage Vm creation 
failure, zone: lab
2018-10-18 06:20:26,077 WARN  [o.a.c.alerts] (secstorage-1:ctx-70aba7ab) 
(logid:f3c51c51) AlertType:: 19 | dataCenterId:: 1 | podId:: null | clusterId:: 
null | message:: Secondary Storage Vm creation failure. zone: lab, error 
details: null
2018-10-18 06:20:26,095 INFO  [o.a.c.s.PremiumSecondaryStorageManagerImpl] 
(secstorage-1:ctx-70aba7ab) (logid:f3c51c51) Primary secondary storage is not 
even started, wait until next turn

Based on the error, it sounds like there's an issue with the SSVM being able to 
communicate with secondary storage, but I don't know where to look for 
additional details about what's going on, or how the SSVM's actually work. I 
need more information. I've been stumbling around in the dark and making sure I 
have secondary storage added without errors to the cloudstack management 
server, I've configured the SSVM template... not sure what else could be wrong 
or where else to 

Re: Problems configuring KVM host

2018-10-18 Thread Alexandre Bruyere
Will definitely look into it - next step of the project IS to build a
CentOS 7 Cloudstack setup, so I can take notes and submit them once it
works.

-Original Message-
Re: Problems configuring KVM host
From: Alexandre Bruyere 
To: 
To Adrija:

You were spot-on. Your instructions allowed me to successfully add a host.

For posterity's sake, here is the specific configuration I've done:

Removed IP from eth0, added it to the cloudbr0 bridge
Created cloudbr0 interface, configured it according to the "Network Example
for Basic Network" in the link provided
Changed the KVM traffic label in the management GUI from "use default
gateway" to "cloudbr0"


And those changes succeeded in making it happen.
Thanks to everyone for helping!

On Thu, Oct 18, 2018 at 10:28 AM Alexandre Bruyere <
bruyere.alexan...@gmail.com> wrote:

> To Simon:
> I would, but that command returns an error:
> -bash: syntax error near unexpected token `newline'
>
> As for the rest (I've trimmed the agent.properties to remove the big
> patches of comments):
> -
> agent.properties
>
> # Sample configuration file for CloudStack agent
>
> # The GUID to identify the agent with, this is mandatory!
> # Generate with "uuidgen"
> guid=
>
> #resource= the java class, which agent load to execute
> resource=com.cloud.hypervisor.kvm.resource.LibvirtComputingResource
>
> #workers= number of threads running in agent
> workers=5
>
> #host= The IP address of management server
> host=localhost
>
> #port = The port management server listening on, default is 8250
> port=8250
>
> #cluster= The cluster which the agent belongs to
> cluster=default
>
> #pod= The pod which the agent belongs to
> pod=default
>
> #zone= The zone which the agent belongs to
> zone=default
>
> # The UUID for the local storage pool, this is mandatory!
> # Generate with "uuidgen"
> local.storage.uuid=
>
> # Location for KVM scripts
> domr.scripts.dir=scripts/network/domr/kvm
>
>
> # set the hypervisor type, values are: kvm, lxc
> hypervisor.type=kvm
>
> keystore.passphrase=X933D63dRPW9dv2C
>
> -
>
> KVM label on management gui is currently set on "use default gateway"
> because I've frozen that particular VM, but I've also tried 204.168.1.1 and
> 204.168.1.0/24. I'll be honest and say I have no clue if that was the
> right thing to put in.
>
> I'll report back once I try Andrija's instructions though, because even I
> can see that the host is thoroughly unconfigured from that agent.properties
> file.
>
> On Wed, Oct 17, 2018 at 3:45 PM Simon Weller 
> wrote:
>
>> Alexandre,
>>
>>
>> Can you place the agent in debug mode - sed -i 's/INFO/DEBUG/g'
>> /etc/cloudstack/agent/log4j-cloud.xml<
>> https://cwiki.apache.org/confluence/display/CLOUDSTACK/log4j-cloud.xml>
>>
>> Then restart the agent and take a log at the logs in
>> /var/log/cloudstack/agent/agent.log
>>
>>
>> Can you supply the contents of /etc/cloudstack/agent/agent.properties?
>>
>> In the cloudstack management gui, what is the KVM travel label set to?
>>
>> - Si
>>
>> 
>> From: Alexandre Bruyere 
>> Sent: Wednesday, October 17, 2018 1:38 PM
>> To: users@cloudstack.apache.org
>> Subject: Re: Problems configuring KVM host
>>
>> Quick update:
>>
>> There is something wrong either with the guide, the hardware/network
>> config
>> or the community repository - because even after following to the letter
>> the guide (which lead the management server to be a host), it still
>> refuses
>> to add the host to manage (even though it's localhost)
>>
>> On Wed, Oct 17, 2018 at 1:46 PM Alexandre Bruyere <
>> bruyere.alexan...@gmail.com> wrote:
>>
>> > To Andrija:
>> >
>> > I'm not sure what you mean by making the NIC part of the BRIDGE - if you
>> > mean make sure it's part of the inner network, it's already done, all
>> > machines (physical and virtual) have Internet access.
>> > I am looking forward to an updated guide if you do get to it, though
>> (the
>> > thought is much appreciated).
>> > -
>> > KVM host configurations:
>> > Starting point: CentOS 6.10 Minimal Install
>> >
>> > ifcfg-eth0
>> >
>> > DEVICE=eth0
>> > HWADDR=[Redacted for readability]
>> > TYPE=Ethernet
>> > UUID=[Redacted for readability]
>> > ONBOOT=yes
>> > NM_CONTROLLED=no
>> > BOOTPROTO=none
>> > IPADDR=204.168.1.51
>> > NETMASK=255.255.255.0
>> > GATEWAY=204.168.1.1
>> > DNS1=192.168.101.1
>> >
>> > SELinux was set to permissive
>> >
>> > NTP was installed
>> >
>> > Community package repository was used:
>> >
>> > cloudstack.repo
>> >
>> > [cloudstack]
>> > name=cloudstack
>> > baseurl=http://download.cloudstack.org/centos/6/4.11/
>> > enabled=1
>> > gpgcheck=0
>> >
>> >
>> > Modified qemu.conf to enable vnc_listen on 0.0.0.0
>> >
>> > Libvrtd.conf had several lines altered as per the tutorial:
>> > listen_tls = 0
>> > listen_tcp = 1
>> > tcp_port = "16059"
>> > auth_tcp = "none"
>> > mdns_adv = 0
>> >
>> > Uncommented LIBVIRTD_ARGS in /etc/sysconfig/libvirtd
>> >
>> > -
>> > Zone config:
>> >
>> > Name: 

Re: Problems configuring KVM host

2018-10-18 Thread Andrija Panic
Sure, great you solved it!

I will try my best to update that article - though you can do it also -
fork, edit, create pull request - this is community stuff :)

Cheers

On Thu, Oct 18, 2018, 16:59 Alexandre Bruyere 
wrote:

> To Adrija:
>
> You were spot-on. Your instructions allowed me to successfully add a host.
>
> For posterity's sake, here is the specific configuration I've done:
>
> Removed IP from eth0, added it to the cloudbr0 bridge
> Created cloudbr0 interface, configured it according to the "Network Example
> for Basic Network" in the link provided
> Changed the KVM traffic label in the management GUI from "use default
> gateway" to "cloudbr0"
>
>
> And those changes succeeded in making it happen.
> Thanks to everyone for helping!
>
> On Thu, Oct 18, 2018 at 10:28 AM Alexandre Bruyere <
> bruyere.alexan...@gmail.com> wrote:
>
> > To Simon:
> > I would, but that command returns an error:
> > -bash: syntax error near unexpected token `newline'
> >
> > As for the rest (I've trimmed the agent.properties to remove the big
> > patches of comments):
> > -
> > agent.properties
> >
> > # Sample configuration file for CloudStack agent
> >
> > # The GUID to identify the agent with, this is mandatory!
> > # Generate with "uuidgen"
> > guid=
> >
> > #resource= the java class, which agent load to execute
> > resource=com.cloud.hypervisor.kvm.resource.LibvirtComputingResource
> >
> > #workers= number of threads running in agent
> > workers=5
> >
> > #host= The IP address of management server
> > host=localhost
> >
> > #port = The port management server listening on, default is 8250
> > port=8250
> >
> > #cluster= The cluster which the agent belongs to
> > cluster=default
> >
> > #pod= The pod which the agent belongs to
> > pod=default
> >
> > #zone= The zone which the agent belongs to
> > zone=default
> >
> > # The UUID for the local storage pool, this is mandatory!
> > # Generate with "uuidgen"
> > local.storage.uuid=
> >
> > # Location for KVM scripts
> > domr.scripts.dir=scripts/network/domr/kvm
> >
> >
> > # set the hypervisor type, values are: kvm, lxc
> > hypervisor.type=kvm
> >
> > keystore.passphrase=X933D63dRPW9dv2C
> >
> > -
> >
> > KVM label on management gui is currently set on "use default gateway"
> > because I've frozen that particular VM, but I've also tried 204.168.1.1
> and
> > 204.168.1.0/24. I'll be honest and say I have no clue if that was the
> > right thing to put in.
> >
> > I'll report back once I try Andrija's instructions though, because even I
> > can see that the host is thoroughly unconfigured from that
> agent.properties
> > file.
> >
> > On Wed, Oct 17, 2018 at 3:45 PM Simon Weller 
> > wrote:
> >
> >> Alexandre,
> >>
> >>
> >> Can you place the agent in debug mode - sed -i 's/INFO/DEBUG/g'
> >> /etc/cloudstack/agent/log4j-cloud.xml<
> >> https://cwiki.apache.org/confluence/display/CLOUDSTACK/log4j-cloud.xml>
> >>
> >> Then restart the agent and take a log at the logs in
> >> /var/log/cloudstack/agent/agent.log
> >>
> >>
> >> Can you supply the contents of /etc/cloudstack/agent/agent.properties?
> >>
> >> In the cloudstack management gui, what is the KVM travel label set to?
> >>
> >> - Si
> >>
> >> 
> >> From: Alexandre Bruyere 
> >> Sent: Wednesday, October 17, 2018 1:38 PM
> >> To: users@cloudstack.apache.org
> >> Subject: Re: Problems configuring KVM host
> >>
> >> Quick update:
> >>
> >> There is something wrong either with the guide, the hardware/network
> >> config
> >> or the community repository - because even after following to the letter
> >> the guide (which lead the management server to be a host), it still
> >> refuses
> >> to add the host to manage (even though it's localhost)
> >>
> >> On Wed, Oct 17, 2018 at 1:46 PM Alexandre Bruyere <
> >> bruyere.alexan...@gmail.com> wrote:
> >>
> >> > To Andrija:
> >> >
> >> > I'm not sure what you mean by making the NIC part of the BRIDGE - if
> you
> >> > mean make sure it's part of the inner network, it's already done, all
> >> > machines (physical and virtual) have Internet access.
> >> > I am looking forward to an updated guide if you do get to it, though
> >> (the
> >> > thought is much appreciated).
> >> > -
> >> > KVM host configurations:
> >> > Starting point: CentOS 6.10 Minimal Install
> >> >
> >> > ifcfg-eth0
> >> >
> >> > DEVICE=eth0
> >> > HWADDR=[Redacted for readability]
> >> > TYPE=Ethernet
> >> > UUID=[Redacted for readability]
> >> > ONBOOT=yes
> >> > NM_CONTROLLED=no
> >> > BOOTPROTO=none
> >> > IPADDR=204.168.1.51
> >> > NETMASK=255.255.255.0
> >> > GATEWAY=204.168.1.1
> >> > DNS1=192.168.101.1
> >> >
> >> > SELinux was set to permissive
> >> >
> >> > NTP was installed
> >> >
> >> > Community package repository was used:
> >> >
> >> > cloudstack.repo
> >> >
> >> > [cloudstack]
> >> > name=cloudstack
> >> > baseurl=http://download.cloudstack.org/centos/6/4.11/
> >> > enabled=1
> >> > gpgcheck=0
> >> >
> >> >
> >> > Modified qemu.conf to enable vnc_listen on 

Re: Problems configuring KVM host

2018-10-18 Thread Alexandre Bruyere
To Adrija:

You were spot-on. Your instructions allowed me to successfully add a host.

For posterity's sake, here is the specific configuration I've done:

Removed IP from eth0, added it to the cloudbr0 bridge
Created cloudbr0 interface, configured it according to the "Network Example
for Basic Network" in the link provided
Changed the KVM traffic label in the management GUI from "use default
gateway" to "cloudbr0"


And those changes succeeded in making it happen.
Thanks to everyone for helping!

On Thu, Oct 18, 2018 at 10:28 AM Alexandre Bruyere <
bruyere.alexan...@gmail.com> wrote:

> To Simon:
> I would, but that command returns an error:
> -bash: syntax error near unexpected token `newline'
>
> As for the rest (I've trimmed the agent.properties to remove the big
> patches of comments):
> -
> agent.properties
>
> # Sample configuration file for CloudStack agent
>
> # The GUID to identify the agent with, this is mandatory!
> # Generate with "uuidgen"
> guid=
>
> #resource= the java class, which agent load to execute
> resource=com.cloud.hypervisor.kvm.resource.LibvirtComputingResource
>
> #workers= number of threads running in agent
> workers=5
>
> #host= The IP address of management server
> host=localhost
>
> #port = The port management server listening on, default is 8250
> port=8250
>
> #cluster= The cluster which the agent belongs to
> cluster=default
>
> #pod= The pod which the agent belongs to
> pod=default
>
> #zone= The zone which the agent belongs to
> zone=default
>
> # The UUID for the local storage pool, this is mandatory!
> # Generate with "uuidgen"
> local.storage.uuid=
>
> # Location for KVM scripts
> domr.scripts.dir=scripts/network/domr/kvm
>
>
> # set the hypervisor type, values are: kvm, lxc
> hypervisor.type=kvm
>
> keystore.passphrase=X933D63dRPW9dv2C
>
> -
>
> KVM label on management gui is currently set on "use default gateway"
> because I've frozen that particular VM, but I've also tried 204.168.1.1 and
> 204.168.1.0/24. I'll be honest and say I have no clue if that was the
> right thing to put in.
>
> I'll report back once I try Andrija's instructions though, because even I
> can see that the host is thoroughly unconfigured from that agent.properties
> file.
>
> On Wed, Oct 17, 2018 at 3:45 PM Simon Weller 
> wrote:
>
>> Alexandre,
>>
>>
>> Can you place the agent in debug mode - sed -i 's/INFO/DEBUG/g'
>> /etc/cloudstack/agent/log4j-cloud.xml<
>> https://cwiki.apache.org/confluence/display/CLOUDSTACK/log4j-cloud.xml>
>>
>> Then restart the agent and take a log at the logs in
>> /var/log/cloudstack/agent/agent.log
>>
>>
>> Can you supply the contents of /etc/cloudstack/agent/agent.properties?
>>
>> In the cloudstack management gui, what is the KVM travel label set to?
>>
>> - Si
>>
>> 
>> From: Alexandre Bruyere 
>> Sent: Wednesday, October 17, 2018 1:38 PM
>> To: users@cloudstack.apache.org
>> Subject: Re: Problems configuring KVM host
>>
>> Quick update:
>>
>> There is something wrong either with the guide, the hardware/network
>> config
>> or the community repository - because even after following to the letter
>> the guide (which lead the management server to be a host), it still
>> refuses
>> to add the host to manage (even though it's localhost)
>>
>> On Wed, Oct 17, 2018 at 1:46 PM Alexandre Bruyere <
>> bruyere.alexan...@gmail.com> wrote:
>>
>> > To Andrija:
>> >
>> > I'm not sure what you mean by making the NIC part of the BRIDGE - if you
>> > mean make sure it's part of the inner network, it's already done, all
>> > machines (physical and virtual) have Internet access.
>> > I am looking forward to an updated guide if you do get to it, though
>> (the
>> > thought is much appreciated).
>> > -
>> > KVM host configurations:
>> > Starting point: CentOS 6.10 Minimal Install
>> >
>> > ifcfg-eth0
>> >
>> > DEVICE=eth0
>> > HWADDR=[Redacted for readability]
>> > TYPE=Ethernet
>> > UUID=[Redacted for readability]
>> > ONBOOT=yes
>> > NM_CONTROLLED=no
>> > BOOTPROTO=none
>> > IPADDR=204.168.1.51
>> > NETMASK=255.255.255.0
>> > GATEWAY=204.168.1.1
>> > DNS1=192.168.101.1
>> >
>> > SELinux was set to permissive
>> >
>> > NTP was installed
>> >
>> > Community package repository was used:
>> >
>> > cloudstack.repo
>> >
>> > [cloudstack]
>> > name=cloudstack
>> > baseurl=http://download.cloudstack.org/centos/6/4.11/
>> > enabled=1
>> > gpgcheck=0
>> >
>> >
>> > Modified qemu.conf to enable vnc_listen on 0.0.0.0
>> >
>> > Libvrtd.conf had several lines altered as per the tutorial:
>> > listen_tls = 0
>> > listen_tcp = 1
>> > tcp_port = "16059"
>> > auth_tcp = "none"
>> > mdns_adv = 0
>> >
>> > Uncommented LIBVIRTD_ARGS in /etc/sysconfig/libvirtd
>> >
>> > -
>> > Zone config:
>> >
>> > Name: CSTestZone
>> > Network Type: Basic
>> > Public: Yes
>> > DNS 1: 192.168.101.1
>> > Internal DNS 1: 192.168.101.1
>> > Guest Network KVM traffic label: 204.168.1.0/24
>> > Management Network KVM traffic label: 204.168.1.0/24
>> >
>> > -
>> > And 

Re: Problems configuring KVM host

2018-10-18 Thread Alexandre Bruyere
To Simon:
I would, but that command returns an error:
-bash: syntax error near unexpected token `newline'

As for the rest (I've trimmed the agent.properties to remove the big
patches of comments):
-
agent.properties

# Sample configuration file for CloudStack agent

# The GUID to identify the agent with, this is mandatory!
# Generate with "uuidgen"
guid=

#resource= the java class, which agent load to execute
resource=com.cloud.hypervisor.kvm.resource.LibvirtComputingResource

#workers= number of threads running in agent
workers=5

#host= The IP address of management server
host=localhost

#port = The port management server listening on, default is 8250
port=8250

#cluster= The cluster which the agent belongs to
cluster=default

#pod= The pod which the agent belongs to
pod=default

#zone= The zone which the agent belongs to
zone=default

# The UUID for the local storage pool, this is mandatory!
# Generate with "uuidgen"
local.storage.uuid=

# Location for KVM scripts
domr.scripts.dir=scripts/network/domr/kvm


# set the hypervisor type, values are: kvm, lxc
hypervisor.type=kvm

keystore.passphrase=X933D63dRPW9dv2C

-

KVM label on management gui is currently set on "use default gateway"
because I've frozen that particular VM, but I've also tried 204.168.1.1 and
204.168.1.0/24. I'll be honest and say I have no clue if that was the right
thing to put in.

I'll report back once I try Andrija's instructions though, because even I
can see that the host is thoroughly unconfigured from that agent.properties
file.

On Wed, Oct 17, 2018 at 3:45 PM Simon Weller 
wrote:

> Alexandre,
>
>
> Can you place the agent in debug mode - sed -i 's/INFO/DEBUG/g'
> /etc/cloudstack/agent/log4j-cloud.xml<
> https://cwiki.apache.org/confluence/display/CLOUDSTACK/log4j-cloud.xml>
>
> Then restart the agent and take a log at the logs in
> /var/log/cloudstack/agent/agent.log
>
>
> Can you supply the contents of /etc/cloudstack/agent/agent.properties?
>
> In the cloudstack management gui, what is the KVM travel label set to?
>
> - Si
>
> 
> From: Alexandre Bruyere 
> Sent: Wednesday, October 17, 2018 1:38 PM
> To: users@cloudstack.apache.org
> Subject: Re: Problems configuring KVM host
>
> Quick update:
>
> There is something wrong either with the guide, the hardware/network config
> or the community repository - because even after following to the letter
> the guide (which lead the management server to be a host), it still refuses
> to add the host to manage (even though it's localhost)
>
> On Wed, Oct 17, 2018 at 1:46 PM Alexandre Bruyere <
> bruyere.alexan...@gmail.com> wrote:
>
> > To Andrija:
> >
> > I'm not sure what you mean by making the NIC part of the BRIDGE - if you
> > mean make sure it's part of the inner network, it's already done, all
> > machines (physical and virtual) have Internet access.
> > I am looking forward to an updated guide if you do get to it, though (the
> > thought is much appreciated).
> > -
> > KVM host configurations:
> > Starting point: CentOS 6.10 Minimal Install
> >
> > ifcfg-eth0
> >
> > DEVICE=eth0
> > HWADDR=[Redacted for readability]
> > TYPE=Ethernet
> > UUID=[Redacted for readability]
> > ONBOOT=yes
> > NM_CONTROLLED=no
> > BOOTPROTO=none
> > IPADDR=204.168.1.51
> > NETMASK=255.255.255.0
> > GATEWAY=204.168.1.1
> > DNS1=192.168.101.1
> >
> > SELinux was set to permissive
> >
> > NTP was installed
> >
> > Community package repository was used:
> >
> > cloudstack.repo
> >
> > [cloudstack]
> > name=cloudstack
> > baseurl=http://download.cloudstack.org/centos/6/4.11/
> > enabled=1
> > gpgcheck=0
> >
> >
> > Modified qemu.conf to enable vnc_listen on 0.0.0.0
> >
> > Libvrtd.conf had several lines altered as per the tutorial:
> > listen_tls = 0
> > listen_tcp = 1
> > tcp_port = "16059"
> > auth_tcp = "none"
> > mdns_adv = 0
> >
> > Uncommented LIBVIRTD_ARGS in /etc/sysconfig/libvirtd
> >
> > -
> > Zone config:
> >
> > Name: CSTestZone
> > Network Type: Basic
> > Public: Yes
> > DNS 1: 192.168.101.1
> > Internal DNS 1: 192.168.101.1
> > Guest Network KVM traffic label: 204.168.1.0/24
> > Management Network KVM traffic label: 204.168.1.0/24
> >
> > -
> > And for good measure, here's the error that the management server throws
> > when I try adding the host (thanks for the path to the logs!)
> >
> > 2018-10-17 13:41:59,867 WARN  [c.c.h.k.d.LibvirtServerDiscoverer]
> > (qtp1386767190-15:ctx-0e54785c ctx-ee01f7ae) (logid:1a5a07f0)  can't
> setup
> > agent, due to com.cloud.utils.exception.CloudRuntimeException: Failed to
> > setup keystore on the KVM host: 204.168.1.51 - Failed to setup keystore
> on
> > the KVM host: 204.168.1.51
> > 2018-10-17 13:41:59,868 WARN  [c.c.r.ResourceManagerImpl]
> > (qtp1386767190-15:ctx-0e54785c ctx-ee01f7ae) (logid:1a5a07f0) Unable to
> > find the server resources at http://204.168.1.51
> > 2018-10-17 13:41:59,868 INFO  [c.c.u.e.CSExceptionErrorCode]
> > (qtp1386767190-15:ctx-0e54785c ctx-ee01f7ae) (logid:1a5a07f0) 

RE: [VOTE] Apache CloudStack 4.11.2.0 RC3

2018-10-18 Thread Paul Angus
Uggh cut and paste fail!

Yes 26th October - end of next week. (I'm on annual leave next week).


Kind regards,

Paul Angus

paul.an...@shapeblue.com 
www.shapeblue.com
Amadeus House, Floral Street, London  WC2E 9DPUK
@shapeblue
  
 


-Original Message-
From: Rene Moser  
Sent: 18 October 2018 12:45
To: d...@cloudstack.apache.org; Paul Angus ; 
users@cloudstack.apache.org
Subject: Re: [VOTE] Apache CloudStack 4.11.2.0 RC3

On 10/18/2018 12:54 PM, Paul Angus wrote:
> The vote will be open until the middle of next week, 26th September 2018.
s/September/October/ right?


Re: [VOTE] Apache CloudStack 4.11.2.0 RC3

2018-10-18 Thread Rene Moser
On 10/18/2018 12:54 PM, Paul Angus wrote:
> The vote will be open until the middle of next week, 26th September 2018.
s/September/October/ right?


RE: [VOTE] Apache CloudStack 4.11.2.0 RC3

2018-10-18 Thread Paul Angus
Hi All,

The issues in RC2 have been fixed so we're ready to go with RC3
I've created a 4.11.2.0 release (RC3), with the following artefacts up for 
testing and a vote:

Git Branch and Commit SH:
https://gitbox.apache.org/repos/asf?p=cloudstack.git;a=shortlog;h=refs/heads/
Commit: a8e53d0e9674028973c8f3a98a5a8ff15b24f5da

Source release (checksums and signatures are available at the same location):
https://dist.apache.org/repos/dist/dev/cloudstack/4.11.2.0/
PGP release keys (signed using 8B309F7251EE0BC8):
https://dist.apache.org/repos/dist/release/cloudstack/KEYS

The vote will be open until the middle of next week, 26th September 2018.

For sanity in tallying the vote, can PMC members please be sure to indicate 
"(binding)" with their vote

[ ] +1 approve
[ ] +0 no opinion
[ ] -1 disapprove (and reason why)

Additional information:

For users' convenience, I've built packages from 
a8e53d0e9674028973c8f3a98a5a8ff15b24f5da and published RC3 repository here:
http://packages.shapeblue.com/testing/4112rc3/

4.11.2 systemvm templates are available from here:
http://packages.shapeblue.com/testing/systemvm/4112rc3





paul.an...@shapeblue.com 
www.shapeblue.com
Amadeus House, Floral Street, London  WC2E 9DPUK
@shapeblue
  
 



Re: Cloudstack database and orphaned entities

2018-10-18 Thread Boris Stoyanov
well, with Xen I think you have a console where you can see and manage all 
running vms on the host and remove if it’s orphaned. Further I think maybe a 
new cloudstack zone/installation would sync this and recognize it as a guest vm 
and probably you’ll be able to see it in cloudstack UI even.. 

*at least that’s what’s happening with VMware. 

Bobby.


boris.stoya...@shapeblue.com 
www.shapeblue.com
Amadeus House, Floral Street, London  WC2E 9DPUK
@shapeblue
  
 

> On 18 Oct 2018, at 13:05, Yordan Kostov  
> wrote:
> 
> Thank you for pointing this out Bobi,
> I will document the steps and open the ticket there.
> 
> Btw forgot to mention - this is ACS 4.11.2 + XenServer.
> 
> Best regards,
> Jordan
> 
> -Original Message-
> From: Boris Stoyanov [mailto:boris.stoya...@shapeblue.com] 
> Sent: Thursday, October 18, 2018 12:49 PM
> To: users@cloudstack.apache.org
> Subject: Re: Cloudstack database and orphaned entities
> 
> Hi Yordan,
> 
> I think the best approach would be to submit an issue in the GitHub page of 
> ACS and document the exact steps on reproducing this issue. From there on 
> someone could pick it up and fix it for the next LTS release. Honestly I 
> don’t think that would be a common production problem, since if someone wants 
> to remove a zone he would be keen on building it up in a fresh installed 
> product on a separate DB/Server. 
> 
> The issue with VMs left behind in hosts could be problematic if there’s no 
> proper loopback on what’s running on the host (kvm mostly), since cloudstack 
> would only interact with it’s own resources and if there’s any other instance 
> running on the KVM host, cloudstack would not touch/report/interact with it’s 
> existence. 
> 
> Good find, please add the issue in github with detailed steps so it can get 
> triaged. 
> 
> Thanks,
> Bobby. 
> 
> 
> boris.stoya...@shapeblue.com
> www.shapeblue.com
> Amadeus House, Floral Street, London  WC2E 9DPUK @shapeblue
> 
> 
> 
>> On 18 Oct 2018, at 12:32, Yordan Kostov  
>> wrote:
>> 
>> Dear all,
>> 
>>   While testing different setups and also deleting them I 
>> noticed that it is occasional/common occurrence that orphaned system VMs or 
>> hosts remain in the database.
>> 
>>   For example - during removal of a zone (system VMs, secondary 
>> storages, host, cluster, pod, networks and then the zone) if not executed in 
>> the correct order system VMs are left orphaned in the DB (no seen in the 
>> GUI) and thus preventing deletion of the POD. The error (quoted by memory) 
>> says "there are existing hosts so operation cannot proceed". Other times the 
>> orphaned VMs lock public IPs preventing deletion of zone networks.
>> 
>>   What I did to go around the issues is go inside the DB and 
>> tweak the cloud -> vm_instance  & hosts table settings for the particular 
>> system instance to mimic the one for other already removed instances 
>> (changing the status to "removed", setings modification date etc).
>> 
>>   What is the best way to approach such issue in production?
>>   Also what is the reasoning for the system VMs are both present 
>> in VM_instance table hosts tables at the same time? It feels counter 
>> intuitive to look for/insert VMs in the hosts table.
>> 
>> Best regards,
>> Jordan Kostov
>> 
> 



RE: Cloudstack database and orphaned entities

2018-10-18 Thread Yordan Kostov
Thank you for pointing this out Bobi,
I will document the steps and open the ticket there.

Btw forgot to mention - this is ACS 4.11.2 + XenServer.

Best regards,
Jordan

-Original Message-
From: Boris Stoyanov [mailto:boris.stoya...@shapeblue.com] 
Sent: Thursday, October 18, 2018 12:49 PM
To: users@cloudstack.apache.org
Subject: Re: Cloudstack database and orphaned entities

Hi Yordan,

I think the best approach would be to submit an issue in the GitHub page of ACS 
and document the exact steps on reproducing this issue. From there on someone 
could pick it up and fix it for the next LTS release. Honestly I don’t think 
that would be a common production problem, since if someone wants to remove a 
zone he would be keen on building it up in a fresh installed product on a 
separate DB/Server. 

The issue with VMs left behind in hosts could be problematic if there’s no 
proper loopback on what’s running on the host (kvm mostly), since cloudstack 
would only interact with it’s own resources and if there’s any other instance 
running on the KVM host, cloudstack would not touch/report/interact with it’s 
existence. 

Good find, please add the issue in github with detailed steps so it can get 
triaged. 

Thanks,
Bobby. 


boris.stoya...@shapeblue.com
www.shapeblue.com
Amadeus House, Floral Street, London  WC2E 9DPUK @shapeblue
  
 

> On 18 Oct 2018, at 12:32, Yordan Kostov  
> wrote:
> 
> Dear all,
> 
>While testing different setups and also deleting them I 
> noticed that it is occasional/common occurrence that orphaned system VMs or 
> hosts remain in the database.
> 
>For example - during removal of a zone (system VMs, secondary 
> storages, host, cluster, pod, networks and then the zone) if not executed in 
> the correct order system VMs are left orphaned in the DB (no seen in the GUI) 
> and thus preventing deletion of the POD. The error (quoted by memory) says 
> "there are existing hosts so operation cannot proceed". Other times the 
> orphaned VMs lock public IPs preventing deletion of zone networks.
> 
>What I did to go around the issues is go inside the DB and 
> tweak the cloud -> vm_instance  & hosts table settings for the particular 
> system instance to mimic the one for other already removed instances 
> (changing the status to "removed", setings modification date etc).
> 
>What is the best way to approach such issue in production?
>Also what is the reasoning for the system VMs are both present 
> in VM_instance table hosts tables at the same time? It feels counter 
> intuitive to look for/insert VMs in the hosts table.
> 
> Best regards,
> Jordan Kostov
> 



Re: Cloudstack database and orphaned entities

2018-10-18 Thread Boris Stoyanov
Hi Yordan,

I think the best approach would be to submit an issue in the GitHub page of ACS 
and document the exact steps on reproducing this issue. From there on someone 
could pick it up and fix it for the next LTS release. Honestly I don’t think 
that would be a common production problem, since if someone wants to remove a 
zone he would be keen on building it up in a fresh installed product on a 
separate DB/Server. 

The issue with VMs left behind in hosts could be problematic if there’s no 
proper loopback on what’s running on the host (kvm mostly), since cloudstack 
would only interact with it’s own resources and if there’s any other instance 
running on the KVM host, cloudstack would not touch/report/interact with it’s 
existence. 

Good find, please add the issue in github with detailed steps so it can get 
triaged. 

Thanks,
Bobby. 


boris.stoya...@shapeblue.com 
www.shapeblue.com
Amadeus House, Floral Street, London  WC2E 9DPUK
@shapeblue
  
 

> On 18 Oct 2018, at 12:32, Yordan Kostov  
> wrote:
> 
> Dear all,
> 
>While testing different setups and also deleting them I 
> noticed that it is occasional/common occurrence that orphaned system VMs or 
> hosts remain in the database.
> 
>For example - during removal of a zone (system VMs, secondary 
> storages, host, cluster, pod, networks and then the zone) if not executed in 
> the correct order system VMs are left orphaned in the DB (no seen in the GUI) 
> and thus preventing deletion of the POD. The error (quoted by memory) says 
> "there are existing hosts so operation cannot proceed". Other times the 
> orphaned VMs lock public IPs preventing deletion of zone networks.
> 
>What I did to go around the issues is go inside the DB and 
> tweak the cloud -> vm_instance  & hosts table settings for the particular 
> system instance to mimic the one for other already removed instances 
> (changing the status to "removed", setings modification date etc).
> 
>What is the best way to approach such issue in production?
>Also what is the reasoning for the system VMs are both present 
> in VM_instance table hosts tables at the same time? It feels counter 
> intuitive to look for/insert VMs in the hosts table.
> 
> Best regards,
> Jordan Kostov
> 



Cloudstack database and orphaned entities

2018-10-18 Thread Yordan Kostov
Dear all,

While testing different setups and also deleting them I noticed 
that it is occasional/common occurrence that orphaned system VMs or hosts 
remain in the database.

For example - during removal of a zone (system VMs, secondary 
storages, host, cluster, pod, networks and then the zone) if not executed in 
the correct order system VMs are left orphaned in the DB (no seen in the GUI) 
and thus preventing deletion of the POD. The error (quoted by memory) says 
"there are existing hosts so operation cannot proceed". Other times the 
orphaned VMs lock public IPs preventing deletion of zone networks.

What I did to go around the issues is go inside the DB and 
tweak the cloud -> vm_instance  & hosts table settings for the particular 
system instance to mimic the one for other already removed instances (changing 
the status to "removed", setings modification date etc).

What is the best way to approach such issue in production?
Also what is the reasoning for the system VMs are both present 
in VM_instance table hosts tables at the same time? It feels counter intuitive 
to look for/insert VMs in the hosts table.

Best regards,
Jordan Kostov