Code Monkey home page Code Monkey logo

Comments (9)

amarts avatar amarts commented on May 16, 2024

Thanks for the report. Will look into this.

But meantime, can you check if changing the 'name' of the storage config is changed to 'storage-pool-1' to something else and try?

from kadalu.

capusta avatar capusta commented on May 16, 2024

Before applying kind: KadaluStorage:

<clip>
csi-nodeplugin-wz4wr             2/2     Running   2          22h
csi-provisioner-0                3/3     Running   0          11h
debian-kadalu-769d8db67f-4pgwn   0/1     Pending   0          12h
operator-68649f4bb6-768rc        1/1     Running   0          3m

storage-pool-1 -> storage-pool-test
after applying:

  • operator logs same error:
  File "/kadalu/main.py", line 339, in main
    crd_watch(core_v1_client, k8s_client)
  File "/kadalu/main.py", line 253, in crd_watch
    handle_added(core_v1_client, obj)
  File "/kadalu/main.py", line 201, in handle_added
    deploy_server_pods(obj)
  File "/kadalu/main.py", line 169, in deploy_server_pods
    execute(KUBECTL_CMD, "create", "-f", filename)
  File "/kadalu/kadalulib.py", line 51, in execute
    raise CommandException(proc.returncode, out.strip(), err.strip())
kadalulib.CommandException: [1] b'' b'Error from server (AlreadyExists): error when creating "/kadalu/templates/server.yaml": statefulsets.apps "server-storage-pool-test-kubenode1.dev.lan" already exists'
  • describing statefulset:
    Warning FailedCreate 2m16s (x17 over 7m44s) statefulset-controller create Pod server-storage-pool-test-kubenode1.dev.lan-0 in StatefulSet server-storage-pool-test-kubenode1.dev.lan failed error: Pod "server-storage-pool-test-kubenode1.dev.lan-0" is invalid: spec.hostname: Invalid value: "server-storage-pool-test-kubenode1.dev.lan-0": a DNS-1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name', or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?')

from kadalu.

amarts avatar amarts commented on May 16, 2024

Interesting. I am still confused about the error 'invalid value' for hostname.

if it is OK, can you get us details of kubectl get nodes and cat config file? (storage-config.yml)

from kadalu.

capusta avatar capusta commented on May 16, 2024

redoing the cluster from scratch:

  • nodes:
NAME                            STATUS   ROLES    AGE   VERSION
gravity-11.capusta.dev.lan      Ready    <none>   65m   v1.16.1
gravity-21.capusta.dev.lan      Ready    <none>   66m   v1.16.1
gravity-3.capusta.dev.lan       Ready    <none>   65m   v1.16.1
kube-master-1.capusta.dev.lan   Ready    master   67m   v1.16.1
  • operator:
[2019-11-07 23:30:48,096] INFO [main - 93:get_brick_device_dir] - {'device': '/dev/sdb', 'node': 'gravity-11.capusta.dev.lan'}
[2019-11-07 23:30:48,097] INFO [main - 95:get_brick_device_dir] - /dev/sdb
Traceback (most recent call last):
  File "/kadalu/main.py", line 344, in <module>
    main()
  File "/kadalu/main.py", line 339, in main
    crd_watch(core_v1_client, k8s_client)
  File "/kadalu/main.py", line 253, in crd_watch
    handle_added(core_v1_client, obj)
  File "/kadalu/main.py", line 201, in handle_added
    deploy_server_pods(obj)
  File "/kadalu/main.py", line 169, in deploy_server_pods
    execute(KUBECTL_CMD, "create", "-f", filename)
  File "/kadalu/kadalulib.py", line 51, in execute
    raise CommandException(proc.returncode, out.strip(), err.strip())
kadalulib.CommandException: [1] b'' b'Error from server (AlreadyExists): error when creating "/kadalu/templates/server.yaml": statefulsets.apps "server-storage-pool-test-gravity-11.capusta.dev.lan" already exists'
  • statefulset:
kubectl -n kadalu describe statefulset server-storage-pool-test-gravity-11.capusta.dev.lan | tail -1
  Warning  FailedCreate  4m55s (x17 over 10m)  statefulset-controller  create Pod server-storage-pool-test-gravity-11.capusta.dev.lan-0 in StatefulSet server-storage-pool-test-gravity-11.capusta.dev.lan failed error: Pod "server-storage-pool-test-gravity-11.capusta.dev.lan-0" is invalid: spec.hostname: Invalid value: "server-storage-pool-test-gravity-11.capusta.dev.lan-0": a DNS-1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name',  or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?')
  • crd:
apiVersion: kadalu-operator.storage/v1alpha1
kind: KadaluStorage
metadata:
  # This will be used as name of PV Hosting Volume
  name: storage-pool-test
  namespace: kadalu
spec:
  type: Replica1
  storage:
  - node: 'gravity-11.capusta.dev.lan'
    device: /dev/sdb

from kadalu.

aravindavk avatar aravindavk commented on May 16, 2024

Thanks for the detailed issue report. I will work on the fix and post the patch. Looks like the issue is using hostname as part of pod name. (https://github.com/kadalu/kadalu/blob/master/templates/server.yaml.j2#L6). I will update here once the patch is available.

from kadalu.

amarts avatar amarts commented on May 16, 2024

Can you try using only gravity-11 as the hostname? Looks like the option is not taking dot.

from kadalu.

aravindavk avatar aravindavk commented on May 16, 2024

Posted a patch for review. #57

from kadalu.

aravindavk avatar aravindavk commented on May 16, 2024

The fix will be available in the next release, meanwhile, the fix can be tested by installing Operator from my staging repository using the following command.

kubectl create -f https://raw.githubusercontent.com/aravindavk/kadalu/fix-podname-issue/manifests/kadalu-operator.yaml

from kadalu.

capusta avatar capusta commented on May 16, 2024

confirmed working (#57 (comment))

from kadalu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.