truecharts / public

Community Helm Chart Repository
https://truecharts.org
GNU Affero General Public License v3.0
1.16k stars 617 forks source link

Mealie - "can't shrink existing storage from 256Gi to 100Gi" #16578

Closed ccalby closed 11 months ago

ccalby commented 11 months ago

App Name

Mealie

Operating System

TrueNAS SCALE 22.12.4.1 or prior

App Version

1.0.0-RC2

Application Events

Error: [EFAULT] Failed to update App: Error: UPGRADE FAILED: cannot patch "mealie-cnpg-main" with kind Cluster: admission webhook "vcluster.cnpg.io" denied the request: Cluster.cluster.cnpg.io "mealie-cnpg-main" is invalid: [spec.storage: Invalid value: resource.Quantity{i:resource.int64Amount{value:0, scale:0}, d:resource.infDecAmount{Dec:(*inf.Dec)(0xc0029eee70)}, s:"100Gi", Format:"BinarySI"}: can't shrink existing storage from 256Gi to 100Gi, spec.walStorage: Invalid value: resource.Quantity{i:resource.int64Amount{value:0, scale:0}, d:resource.infDecAmount{Dec:(*inf.Dec)(0xc0029ef0b0)}, s:"100Gi", Format:"BinarySI"}: can't shrink existing storage from 256Gi to 100Gi]

Application Logs

Startup probe errored: rpc error: code = Unknown desc = failed to exec in container: failed to start exec "2abc8275aec400236a0218bd3b34301b8d158d73e9d1b866aa92b3f726f3187b": OCI runtime exec failed: exec failed: unable to start container process: exec: "python": executable file not found in $PATH: unknown

Application Configuration

Default

Describe the bug

Unable to save configuration due to error.

Error: [EFAULT] Failed to update App: Error: UPGRADE FAILED: cannot patch "mealie-cnpg-main" with kind Cluster: admission webhook "vcluster.cnpg.io" denied the request: Cluster.cluster.cnpg.io "mealie-cnpg-main" is invalid: [spec.storage: Invalid value: resource.Quantity{i:resource.int64Amount{value:0, scale:0}, d:resource.infDecAmount{Dec:(*inf.Dec)(0xc0029eee70)}, s:"100Gi", Format:"BinarySI"}: can't shrink existing storage from 256Gi to 100Gi, spec.walStorage: Invalid value: resource.Quantity{i:resource.int64Amount{value:0, scale:0}, d:resource.infDecAmount{Dec:(*inf.Dec)(0xc0029ef0b0)}, s:"100Gi", Format:"BinarySI"}: can't shrink existing storage from 256Gi to 100Gi]

To Reproduce

Attempt to edit Mealie with no changes and save. Errors initially relating to Postgresql Mode not having a value and Static Fixed PVC Bindings not having a value. Fix with defaults (standalone & disabled). Save Error shows.

Expected Behavior

Configuration saves.

Screenshots

N/A

Additional Context

Stacktrace:

 Error: Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/middlewared/job.py", line 427, in run
    await self.future
  File "/usr/lib/python3/dist-packages/middlewared/job.py", line 465, in __run_body
    rv = await self.method(*([self] + args))
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/service/crud_service.py", line 194, in nf
    rv = await func(*args, **kwargs)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/schema/processor.py", line 44, in nf
    res = await f(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/schema/processor.py", line 177, in nf
    return await func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/plugins/chart_releases_linux/chart_release.py", line 559, in do_update
    await self.middleware.call('chart.release.helm_action', chart_release, chart_path, config, 'update')
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1399, in call
    return await self._call(
           ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1353, in _call
    return await self.run_in_executor(prepared_call.executor, methodobj, *prepared_call.args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1251, in run_in_executor
    return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/plugins/chart_releases_linux/helm.py", line 49, in helm_action
    raise CallError(f'Failed to {tn_action} App: {errmsg}')
middlewared.service_exception.CallError: [EFAULT] Failed to update App: Error: UPGRADE FAILED: cannot patch "mealie-cnpg-main" with kind Cluster: admission webhook "vcluster.cnpg.io" denied the request: Cluster.cluster.cnpg.io "mealie-cnpg-main" is invalid: [spec.storage: Invalid value: resource.Quantity{i:resource.int64Amount{value:0, scale:0}, d:resource.infDecAmount{Dec:(*inf.Dec)(0xc0029eee70)}, s:"100Gi", Format:"BinarySI"}: can't shrink existing storage from 256Gi to 100Gi, spec.walStorage: Invalid value: resource.Quantity{i:resource.int64Amount{value:0, scale:0}, d:resource.infDecAmount{Dec:(*inf.Dec)(0xc0029ef0b0)}, s:"100Gi", Format:"BinarySI"}: can't shrink existing storage from 256Gi to 100Gi]

I've read and agree with the following

stavros-k commented 11 months ago
  1. We do not support Bluefin anymore 1a. Upgrade to Cobia, this would solve the static mode errors
  2. You cannot shrink PVC. 2a. Set the size to 256 as it was
ccalby commented 11 months ago

@stavros-k - This is on Cobia? TrueNAS-SCALE-23.10.1. My mistake with the selection. Not trying to shrink PVC size. The size was 8Gi and always has been. Not sure where the 256Gi and 100Gi is coming from.

stavros-k commented 11 months ago

@stavros-k - This is on Cobia? TrueNAS-SCALE-23.10.1. My mistake with the selection. Not trying to shrink PVC size. The size was 8Gi and always has been. Not sure where the 256Gi and 100Gi is coming from.

There wasn't an option to set the database PVC afaik before. Its only got added recently. So the default was 256

Please use Discord for support! Thanks