Shrinking RBD volume

2021-08-09 Thread Joshua Schaeffer
Is shrinking an RBD datadisk volume supported in ACS 4.15.0.0? When I try to 
shrink the volume (volume has no data on it and is unattached) I get an error:

2021-08-10 04:05:03,150 DEBUG [c.c.a.t.Request] 
(API-Job-Executor-19:ctx-24b7cda8 job-771 ctx-c40ce838) (logid:ef1cc616) Seq 
17-2639953806569271643: Sending  { Cmd , MgmtId: 90520733511963, via: 
17(bllcloudcmp01), Ver: v1, Flags: 100011, 
[{"com.cloud.agent.api.storage.ResizeVolumeCommand":{"path":"649f1b12-fd51-4171-bf70-b22a3cb74c57","pool":{"id":"10","uuid":"35850adc-d711-306f-b111-9c90205274b1","host":"bllcloudceph01-storage.harmonywave.cloud","path":"cloudstack","userInfo":"cloudstack:AQDURgdhqpXiOBAAuDq6_LET116OIBZU11pg0Q==","port":"0","type":"RBD"},"currentSize":"107374182400","newSize":"(20.00
 GB) 
21474836480","shrinkOk":"true","vmInstance":"none","managed":"false","wait":"0"}}]
 }
2021-08-10 04:05:03,443 DEBUG [c.c.a.t.Request] (AgentManager-Handler-12:null) 
(logid:) Seq 17-2639953806569271643: Processing:  { Ans: , MgmtId: 
90520733511963, via: 17, Ver: v1, Flags: 10, 
[{"com.cloud.agent.api.storage.ResizeVolumeAnswer":{"newSize":"(0 bytes) 
0","result":"false","details":"org.libvirt.LibvirtException: invalid argument: 
can't shrink capacity below existing allocation","wait":"0"}}] }
2021-08-10 04:05:03,443 DEBUG [c.c.a.t.Request] 
(API-Job-Executor-19:ctx-24b7cda8 job-771 ctx-c40ce838) (logid:ef1cc616) Seq 
17-2639953806569271643: Received:  { Ans: , MgmtId: 90520733511963, via: 
17(bllcloudcmp01), Ver: v1, Flags: 10, { ResizeVolumeAnswer } }
2021-08-10 04:05:03,507 WARN  [o.a.c.s.d.ObjectInDataStoreManagerImpl] 
(API-Job-Executor-19:ctx-24b7cda8 job-771 ctx-c40ce838) (logid:ef1cc616) 
Unsupported data object (VOLUME, 
org.apache.cloudstack.storage.datastore.PrimaryDataStoreImpl@577a814a), no need 
to delete from object in store ref table
2021-08-10 04:05:03,510 WARN  [c.c.s.VolumeApiServiceImpl] 
(API-Job-Executor-19:ctx-24b7cda8 job-771 ctx-c40ce838) (logid:ef1cc616) Failed 
to resize the volume Vol[75|vm=null|DATADISK]
2021-08-10 04:05:03,581 ERROR [c.c.a.ApiAsyncJobDispatcher] 
(API-Job-Executor-19:ctx-24b7cda8 job-771) (logid:ef1cc616) Unexpected 
exception while executing 
org.apache.cloudstack.api.command.admin.volume.ResizeVolumeCmdByAdmin
com.cloud.utils.exception.CloudRuntimeException: Exception caught during resize 
volume operation of volume UUID: 649f1b12-fd51-4171-bf70-b22a3cb74c57
    at 
com.cloud.storage.VolumeApiServiceImpl.orchestrateResizeVolume(VolumeApiServiceImpl.java:1288)
    at 
com.cloud.storage.VolumeApiServiceImpl.resizeVolume(VolumeApiServiceImpl.java:1147)
    at 
com.cloud.storage.VolumeApiServiceImpl.resizeVolume(VolumeApiServiceImpl.java:191)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method)
    at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at 
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
    at 
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
    at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
    at 
org.apache.cloudstack.network.contrail.management.EventUtils$EventInterceptor.invoke(EventUtils.java:107)
    at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
    at 
com.cloud.event.ActionEventInterceptor.invoke(ActionEventInterceptor.java:51)
    at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
    at 
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:95)
    at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
    at 
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
    at com.sun.proxy.$Proxy215.resizeVolume(Unknown Source)
    at 
org.apache.cloudstack.api.command.user.volume.ResizeVolumeCmd.execute(ResizeVolumeCmd.java:191)
    at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:156)
    at 
com.cloud.api.ApiAsyncJobDispatcher.runJob(ApiAsyncJobDispatcher.java:108)
    at 
org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:620)
    at 
org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:48)
    at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:55)
    at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:102)
    at 

Upcoming Webinar: Competing Hyperscalers with CloudStack-Based In-Country Public Clouds

2021-08-09 Thread Ivet Petrova
Hello all,

I hope all of you are having a great summer although the hot weather or 
flooding in some parts of the world.

I am writing to share an upcoming webinar, which might be of interest for some 
of you: Competing Hyperscalers with CloudStack-Based In-Country Public Clouds
The event will happen on August 25th, 13:00 CEST (find your time zone 
here)

Part of the topics we will cover in the webinar together with IndiQus 
Technologies are:
- The steps to building a reliable and high-performance IaaS offering/Public 
Cloud
- How to choose a cloud management platform – comparing open-source vs. 
proprietary technologies
- The benefits of CloudStack
- Switching from another cloud orchestrator to CloudStack - what you should know
- A turnkey CloudStack solution: cloud monetisation solution, management 
platform and the needed technology stack


Register for the Webinar here:
https://zoom.us/webinar/register/8516285098021/WN_8PaEzQDGSCWW0IZJpJCK_w


Kind regards,


 



slow vm start and dhcp log full?

2021-08-09 Thread Yordan Kostov
Hello everyone,

Cloudstack 4.15 + XCP-NG 82 + Virtual router template 4.15. We 
got just about 15 VMs or so running. Mostly doing some backup tests or people 
trying it out.

Recently I noticed quite some sluggishness on our environment. 
It took about 5-10 mins to create a new VM or start existing one.
One of our networks stopped creating VMs where it seems the 
Virtual router was not giving addresses.

After some troubleshooting  I found the following issues:

  *   The Virtual router that did not give IP addresses had his 
/run/log/journal directory fill in the whole /run partition with logs.  It 
seems when this happen the Router stops giving IP addresses.
  *   The same Virtual router + one more were putting heavy load on the storage 
(20-25 MB/s) squeezing all the IOPS they can get.


Lets say issue number one is by design. What causes issue number 2?
VR logs  ( journalctl -p 3 -x --file 
/run/log/journal/5212989feea04bb6b13843e7b0c9d2b3/system.journal )  show this 
issue repeating:

Aug 09 11:41:22 r-39-VM systemd[1]: Failed to start User Manager for UID 0.
-- Subject: A start job for unit user@0.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit user@0.service has finished with a failure.
--
-- The job identifier is 588 and the job result is failed.
Aug 09 11:41:29 r-39-VM systemd[1607]: PAM _pam_load_conf_file: unable to open 
config for /etc/pam.d/null
Aug 09 11:41:29 r-39-VM systemd[1607]: PAM error loading (null)
Aug 09 11:41:29 r-39-VM systemd[1607]: PAM _pam_init_handlers: error reading 
/etc/pam.d/systemd-user
Aug 09 11:41:29 r-39-VM systemd[1607]: PAM _pam_init_handlers: [Critical error 
- immediate abort]
Aug 09 11:41:29 r-39-VM systemd[1607]: PAM error reading PAM configuration file
Aug 09 11:41:29 r-39-VM systemd[1607]: PAM pam_start: failed to initialize 
handlers
Aug 09 11:41:29 r-39-VM systemd[1607]: PAM failed: Critical error - immediate 
abort
Aug 09 11:41:29 r-39-VM systemd[1607]: user@0.service: Failed to set up PAM 
session: Operation not permitted
Aug 09 11:41:29 r-39-VM systemd[1607]: user@0.service: Failed at step PAM 
spawning /lib/systemd/systemd: Operation not permitted
-- Subject: Process /lib/systemd/systemd could not be executed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The process /lib/systemd/systemd could not be executed and failed.
--
-- The error number returned by this process is ERRNO.

After rebooting the VMs things are back to normal, at least for 
now.
Any advice on why VRs behave like that and why PAM is 
complaining ?

Best regards,
Jordan


Re: 'Infrastructure' then 'Hosts' in the webui not working

2021-08-09 Thread David Jumani
Adding to what Andria, could you also add the browser console logs

From: Andrija Panic 
Sent: Monday, August 9, 2021 1:01 PM
To: users 
Subject: Re: 'Infrastructure' then 'Hosts' in the webui not working

Hi James,

this might sound like a bug (unless someone advices otherwise) - so I would
advise that you open a GitHub issue, it would be good if you have saved
some screenshots - take time to properly report the problem, so that people
can look into it.

Thanks,
Andrija





 

On Sat, 7 Aug 2021 at 11:12, James Steele  wrote:

> My setup: Ubuntu Server 20.04.2, MySQL Ver 8.0.26-0ubuntu0.20.04.2
>
> I have been getting an error that when I click 'Infrastructure' then
> 'Hosts' in the webui (http://ipaddress:8080/client/) the error message:
> '(X) For input string: " "' is shown briefly, but the hosts are NOT listed.
> However the old web client works fine (
> http://ipaddress:8080/client/legacy/).
>
> The boxes that have the error were upgraded from 4.15 to 4.15.1
>
> I have just done a clean install on identical hardware straight to 4.15.1
> and there are no longer any errors.
>
> People have suggested that system Locale may be a problem. However using
> the default locale on the new install works fine (en_GB.UTF-8) and doesn’t
> need changing.
>
> I don’t think locale is the issue now (for me anyway). I think the mysql
> database has either been changed somehow during the original systems
> upgrade procedure. Or the 4.15 created database is being accessed
> differently from the system that has been through the upgrade procedure to
> 4.15.1
>
> Summary:
>
> Hardware, setup with 4.15, then upgraded to 4.15.1
> http://ipaddress:8080/client/#/host= 'Hosts' tab in the webui
> BROKEN with error
> http://ipaddress:8080/client/legacy/ = 'Hosts' tab in the webui is
> OK, lists all hosts correctly
>
> Hardware, setup clean with 4.15.1
> http://ipaddress:8080/client/#/host= 'Hosts' tab in the webui is
> OK, lists all hosts correctly
> http://ipaddress:8080/client/legacy/ = 'Hosts' tab in the webui is
> OK, lists all hosts correctly
>
> Any ideas?
>


--

Andrija Panić


Re: 'Infrastructure' then 'Hosts' in the webui not working

2021-08-09 Thread Andrija Panic
Hi James,

this might sound like a bug (unless someone advices otherwise) - so I would
advise that you open a GitHub issue, it would be good if you have saved
some screenshots - take time to properly report the problem, so that people
can look into it.

Thanks,
Andrija




On Sat, 7 Aug 2021 at 11:12, James Steele  wrote:

> My setup: Ubuntu Server 20.04.2, MySQL Ver 8.0.26-0ubuntu0.20.04.2
>
> I have been getting an error that when I click 'Infrastructure' then
> 'Hosts' in the webui (http://ipaddress:8080/client/) the error message:
> '(X) For input string: " "' is shown briefly, but the hosts are NOT listed.
> However the old web client works fine (
> http://ipaddress:8080/client/legacy/).
>
> The boxes that have the error were upgraded from 4.15 to 4.15.1
>
> I have just done a clean install on identical hardware straight to 4.15.1
> and there are no longer any errors.
>
> People have suggested that system Locale may be a problem. However using
> the default locale on the new install works fine (en_GB.UTF-8) and doesn’t
> need changing.
>
> I don’t think locale is the issue now (for me anyway). I think the mysql
> database has either been changed somehow during the original systems
> upgrade procedure. Or the 4.15 created database is being accessed
> differently from the system that has been through the upgrade procedure to
> 4.15.1
>
> Summary:
>
> Hardware, setup with 4.15, then upgraded to 4.15.1
> http://ipaddress:8080/client/#/host= 'Hosts' tab in the webui
> BROKEN with error
> http://ipaddress:8080/client/legacy/ = 'Hosts' tab in the webui is
> OK, lists all hosts correctly
>
> Hardware, setup clean with 4.15.1
> http://ipaddress:8080/client/#/host= 'Hosts' tab in the webui is
> OK, lists all hosts correctly
> http://ipaddress:8080/client/legacy/ = 'Hosts' tab in the webui is
> OK, lists all hosts correctly
>
> Any ideas?
>


-- 

Andrija Panić