cloudstack-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Slavka Peleva <slav...@storpool.com.INVALID>
Subject Re: Shrinking RBD volume
Date Tue, 10 Aug 2021 07:17:34 GMT
Hi Joshua,

I was able to reproduce the same problem with libvirt version 4.5.0

Error 530, org.libvirt.LibvirtException: invalid argument: can't shrink
capacity below existing allocation
{
  "accountid": "7e36ad14-f8eb-11eb-909b-02000a02012b",
  "cmd":
"org.apache.cloudstack.api.command.admin.volume.ResizeVolumeCmdByAdmin",
  "created": "2021-08-10T10:11:05+0300",
  "jobid": "9fb0bb12-bcfe-4109-974d-2b40cdcf5f59",
  "jobprocstatus": 0,
  "jobresult": {
    "errorcode": 530,
    "errortext": "org.libvirt.LibvirtException: invalid argument: can't
shrink capacity below existing allocation"
  },
  "jobresultcode": 530,
  "jobresulttype": "object",
  "jobstatus": 2,
  "userid": "7e36ccac-f8eb-11eb-909b-02000a02012b"
}

with libvirt version 5.0.0 there is another problem, but I didn't dig more
why

{
  "accountid": "8d16cd0d-3574-11eb-8b84-02000a02019c",
  "cmd":
"org.apache.cloudstack.api.command.admin.volume.ResizeVolumeCmdByAdmin",
  "completed": "2021-08-10T09:45:51+0300",
  "created": "2021-08-10T09:45:48+0300",
  "jobid": "7cbff5cb-90f2-4c70-8f94-40e8eef0dc7e",
  "jobprocstatus": 0,
  "jobresult": {
    "errorcode": 530,
    "errortext": "Failed to resize volume operation of volume UUID:
[b6809fce-bfb4-4b4f-a1e5-46cccd14e582] due to -
org.libvirt.LibvirtException: unsupported flags (0x4) in function
virStorageBackendRBDResizeVol"
  },
  "jobresultcode": 530,
  "jobresulttype": "object",
  "jobstatus": 2,
  "userid": "8d16eccb-3574-11eb-8b84-02000a02019c"
}

Best regards,
Slavka

On Tue, Aug 10, 2021 at 8:14 AM Joshua Schaeffer <jschaeffer@harmonywave.com>
wrote:

> 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
> org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:52)
>     at
> org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:45)
>     at
> org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.run(AsyncJobManagerImpl.java:568)
>     at
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
>     at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
>     at
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
>     at
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
>     at java.base/java.lang.Thread.run(Thread.java:829)
> Caused by: com.cloud.utils.exception.CloudRuntimeException:
> org.libvirt.LibvirtException: invalid argument: can't shrink capacity below
> existing allocation
>     at
> com.cloud.storage.VolumeApiServiceImpl.orchestrateResizeVolume(VolumeApiServiceImpl.java:1248)
>     at
> com.cloud.storage.VolumeApiServiceImpl.resizeVolume(VolumeApiServiceImpl.java:1147)
>     at
> com.cloud.storage.VolumeApiServiceImpl.resizeVolume(VolumeApiServiceImpl.java:191)
>     ... 30 more
>
> I'm assuming this operation just isn't supported by libvirt or Ceph, but
> would like to know for sure.
>
> --
> Thanks,
> Joshua Schaeffer
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message