eclipse / packages

IoT Packages project
https://eclipse.org/packages
Eclipse Public License 2.0
46 stars 66 forks source link

Invalid PVC size #478

Closed paulocabrita-ionos closed 1 year ago

paulocabrita-ionos commented 1 year ago

Hello.

I'm trying to install Hono with the default configuration using the IONOS Cloud without success.

I used the following command to do the install process:

helm install --dependency-update -n digitaltwin-iot eclipse-hono eclipse-iot/hono

And I have Dynamic Volume Provisioning by default but the device registry is always on a pending state. So I did some research and I found the following error:

│ Namespace:     digitaltwin-iot                                                                                                                                                             │
│ StorageClass:  ionos-enterprise-hdd                                                                                                                                                        │
│ Status:        Pending                                                                                                                                                                     │
│ Volume:                                                                                                                                                                                    │
│ Labels:        app.kubernetes.io/component=service-device-registry                                                                                                                         │
│                app.kubernetes.io/instance=eclipse-hono                                                                                                                                     │
│                app.kubernetes.io/managed-by=Helm                                                                                                                                           │
│                app.kubernetes.io/name=hono                                                                                                                                                 │
│                app.kubernetes.io/version=2.3.0                                                                                                                                             │
│                helm.sh/chart=hono-2.4.2                                                                                                                                                    │
│ Annotations:   meta.helm.sh/release-name: eclipse-hono                                                                                                                                     │
│                meta.helm.sh/release-namespace: digitaltwin-iot                                                                                                                             │
│                volume.beta.kubernetes.io/storage-provisioner: cloud.ionos.com                                                                                                              │
│                volume.kubernetes.io/selected-node: pool2-qigkbnhwa4                                                                                                                        │
│                volume.kubernetes.io/storage-provisioner: cloud.ionos.com                                                                                                                   │
│ Finalizers:    [kubernetes.io/pvc-protection]                                                                                                                                              │
│ Capacity:                                                                                                                                                                                  │
│ Access Modes:                                                                                                                                                                              │
│ VolumeMode:    Filesystem                                                                                                                                                                  │
│ Used By:       eclipse-hono-service-device-registry-0                                                                                                                                      │
│ Events:                                                                                                                                                                                    │
│   Type     Reason                Age                             From                                                                                  Message                             │
│   ----     ------                ----                            ----                                                                                  -------                             │
│   Normal   WaitForFirstConsumer  <invalid>                       persistentvolume-controller                                                           waiting for first consumer to be cr │
│ eated before binding                                                                                                                                                                       │
│   Normal   Provisioning          <invalid> (x8 over <invalid>)   cloud.ionos.com_csi-ionoscloud-858fb6c475-sx97f_3ce94367-9af6-4893-a5e3-e1c8ba99c9b5  External provisioner is provisionin │
│ g volume for claim "digitaltwin-iot/eclipse-hono-service-device-registry"                                                                                                                  │
│   Warning  ProvisioningFailed    <invalid> (x8 over <invalid>)   cloud.ionos.com_csi-ionoscloud-858fb6c475-sx97f_3ce94367-9af6-4893-a5e3-e1c8ba99c9b5  failed to provision volume with Sto │
│ rageClass "ionos-enterprise-hdd": rpc error: code = OutOfRange desc = requested size 1048576 must be between 1073741824 and 4398046511104 bytes

It seems that the size of the storage for the device registry pod is too small and does not comply with the IONOS policy which minimum length is 1Gb.

Is it possible to increase the device registry pod storage size? I didn't find any parameter looking at Hono's chart. Any advice?

I think my issue is related to this one: https://github.com/eclipse-hono/hono/issues/1694

Thanks

sophokles73 commented 1 year ago

Is it possible to increase the device registry pod storage size? I didn't find any parameter looking at Hono's chart.

It is not possible by means of setting a parameter during installation. However, it should not be too hard to add this to the chart. We would be happy to accept a corresponding pull request ...

In the meantime you can simply overwrite the default size in the hono/templates/hono-service-device-registry-embedded/hono-service-device-registry-embedded-pvc.yaml file and install the chart from your local filesystem.

To download and expand the chart locally:

helm pull --untar eclipse-iot/hono
paulocabrita-ionos commented 1 year ago

Thanks.

After the helm pull, I did the following:

It worked.

I will create the PR.

You can close this issue :)

sophokles73 commented 1 year ago

In order to install from the local file system, you do not need to necessarily increase the chart version nor create an archive again. You can simply install from the folder:

helm install -n <NS> eclipse-hono /PATH/TO/THE/EXPANDED/CHART

Best practice is that the person who opened the issue (having the problem) closes the issue once the problem has been resolved from their point of view :-)

paulocabrita-ionos commented 1 year ago

I fixed my issue.

Thanks! :)