Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CouchDB pods not being created #210

Open
myypo opened this issue Feb 3, 2024 · 0 comments
Open

CouchDB pods not being created #210

myypo opened this issue Feb 3, 2024 · 0 comments

Comments

@myypo
Copy link

myypo commented Feb 3, 2024

What happened?

Have trouble setting up a fabric network with peers using couchdb. When I set kubectl hlf peer create argument --statedb=couchdb or manually apply custom FabricPeer CRDs where I change stateDb and set externalCouchDB to null it only creates peer nodes.

Is it how it is supposed to work and I just have to create these instances myself? In the operator's source code I've found secret, service and deployment templates for CouchDB so I am assuming that the behaviour is incorrect. No errors were risen.

What did you expect to happen?

Couchdb pods to be created alongside fabric peer pods.

How can we reproduce it (as minimally and precisely as possible)?

Running

kubectl hlf peer create --statedb=couchdb --image=$PEER_IMAGE --version=$PEER_VERSION --storage-class=standard --enroll-id=peer --mspid=Org1MSP \
	--enroll-pw=peerpw --capacity=5Gi --name=org1-peer0 --ca-name=org1-ca.default \
	--hosts=peer0-org1.localho.st --istio-port=443

or

kubectl apply -f - <<EOF
apiVersion: hlf.kungfusoftware.es/v1alpha1
kind: FabricPeer
metadata:
  name: org1-peer0
  namespace: default
spec:
  couchDBexporter: null
  couchdb:
    externalCouchDB: null
    image: couchdb
    user: couchdb
    password: couchdb
  discovery:
    period: 60s
    touchPeriod: 60s
  dockerSocketPath: ""
  env: null
  external_chaincode_builder: false
  externalBuilders:
  - name: ccaas_builder
    path: /opt/hyperledger/ccaas_builder
    propagateEnvironment:
    - CHAINCODE_AS_A_SERVICE_BUILDER_CONFIG
  externalEndpoint: peer0-org1.localho.st:443
  gatewayApi:
    gatewayName: hlf-gateway
    gatewayNamespace: default
    port: 443
  gossip:
    bootstrap: ""
    endpoint: ""
    externalEndpoint: peer0-org1.localho.st:443
    orgLeader: false
    useLeaderElection: true
  grpcProxy: null
  hostAliases: null
  hosts:
  - peer0-org1.localho.st
  image: hyperledger/fabric-peer
  imagePullPolicy: Always
  imagePullSecrets: null
  istio:
    hosts:
    - peer0-org1.localho.st
    ingressGateway: ingressgateway
    port: 443
  logging:
    cauthdsl: info
    gossip: info
    grpc: info
    ledger: info
    level: info
    msp: info
    peer: info
    policies: info
  mspID: Org1MSP
  replicas: 1
  resources:
    chaincode:
      limits:
        cpu: "1"
        memory: 100Mi
      requests:
        cpu: 10m
        memory: 10m
    couchdb:
      limits:
        cpu: "1"
        memory: 512Mi
      requests:
        cpu: 10m
        memory: 10m
    couchdbExporter: null
    peer:
      limits:
        cpu: "1"
        memory: 512Mi
      requests:
        cpu: 10m
        memory: 128Mi
    proxy: null
  secret:
    enrollment:
      component:
        cahost: org1-ca.localho.st
        caname: ca
        caport: 443
        catls:
          cacert: |
${cachain}
        enrollid: peer
        enrollsecret: peerpw
        external: null
      tls:
        cahost: org1-ca.localho.st
        caname: tlsca
        caport: 443
        catls:
          cacert: |
${cachain}
        csr:
          cn: ""
          hosts:
          - 127.0.0.1
          - localhost
          - 172.19.0.2
          - org1-peer0
          - org1-peer0.default
          - peer0-org1.localho.st
        enrollid: peer
        enrollsecret: peerpw
        external: null
  service:
    type: ClusterIP
  serviceMonitor: null
  stateDb: couchdb
  storage:
    chaincode:
      accessMode: ReadWriteOnce
      size: 5Gi
      storageClass: standard
    couchdb:
      accessMode: ReadWriteOnce
      size: 5Gi
      storageClass: standard
    peer:
      accessMode: ReadWriteOnce
      size: 5Gi
      storageClass: standard
  tag: 2.5.5
EOF

Anything else we need to know?

No response

Kubernetes version

kubectl get nodes -o wide
# kubectl get nodes -o wide
NAME                 STATUS   ROLES           AGE     VERSION   INTERNAL-IP   EXTERNAL-IP   OS-IMAGE             KERNEL-VERSION   CONTAINER-RUNTIME
kind-control-plane   Ready    control-plane   8m33s   v1.25.8   172.18.0.2    <none>        Ubuntu 22.04.2 LTS   6.6.7-xanmod1    containerd://1.6.19-46-g941215f49
kubectl get all
# kubectl get all
NAME                                                   READY   STATUS             RESTARTS       AGE
pod/hlf-operator-controller-manager-78cc6859f8-tffpd   2/2     Running            0              10m
pod/ord-ca-69958466f5-l9k9d                            1/1     Running            0              6m6s
pod/ord-node1-6b9fbbd848-8898p                         1/1     Running            0              5m49s
pod/ord-node2-6b456c6578-k85zh                         1/1     Running            0              5m47s
pod/ord-node3-67c8db66fc-d52rc                         1/1     Running            0              5m47s
pod/org1-ca-5cf69456f5-2zvnw                           1/1     Running            0              10m
pod/org1-peer0-7dbb566798-snc5z                        1/2     CrashLoopBackOff   9 (2m1s ago)   9m4s
pod/org1-peer1-f86fb5b4b-tctb2                         1/2     CrashLoopBackOff   9 (118s ago)   9m2s

NAME                                                      TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)                               AGE
service/hlf-operator-controller-manager-metrics-service   ClusterIP   10.96.215.154   <none>        8443/TCP                              10m
service/kubernetes                                        ClusterIP   10.96.0.1       <none>        443/TCP                               11m
service/ord-ca                                            ClusterIP   10.96.198.65    <none>        7054/TCP,9443/TCP                     6m6s
service/ord-node1                                         ClusterIP   10.96.212.13    <none>        7050/TCP,7053/TCP,9443/TCP            5m49s
service/ord-node2                                         ClusterIP   10.96.76.128    <none>        7050/TCP,7053/TCP,9443/TCP            5m47s
service/ord-node3                                         ClusterIP   10.96.5.218     <none>        7050/TCP,7053/TCP,9443/TCP            5m47s
service/org1-ca                                           ClusterIP   10.96.204.149   <none>        7054/TCP,9443/TCP                     10m
service/org1-peer0                                        ClusterIP   10.96.128.132   <none>        7051/TCP,7052/TCP,7053/TCP,9443/TCP   9m7s
service/org1-peer0-fs                                     ClusterIP   10.96.120.12    <none>        8080/TCP                              9m4s
service/org1-peer1                                        ClusterIP   10.96.44.29     <none>        7051/TCP,7052/TCP,7053/TCP,9443/TCP   9m4s
service/org1-peer1-fs                                     ClusterIP   10.96.99.212    <none>        8080/TCP                              9m2s

NAME                                              READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/hlf-operator-controller-manager   1/1     1            1           10m
deployment.apps/ord-ca                            1/1     1            1           6m6s
deployment.apps/ord-node1                         1/1     1            1           5m49s
deployment.apps/ord-node2                         1/1     1            1           5m47s
deployment.apps/ord-node3                         1/1     1            1           5m47s
deployment.apps/org1-ca                           1/1     1            1           10m
deployment.apps/org1-peer0                        0/1     1            0           9m4s
deployment.apps/org1-peer1                        0/1     1            0           9m2s

NAME                                                         DESIRED   CURRENT   READY   AGE
replicaset.apps/hlf-operator-controller-manager-78cc6859f8   1         1         1       10m
replicaset.apps/ord-ca-69958466f5                            1         1         1       6m6s
replicaset.apps/ord-node1-6b9fbbd848                         1         1         1       5m49s
replicaset.apps/ord-node2-6b456c6578                         1         1         1       5m47s
replicaset.apps/ord-node3-67c8db66fc                         1         1         1       5m47s
replicaset.apps/org1-ca-5cf69456f5                           1         1         1       10m
replicaset.apps/org1-peer0-7dbb566798                        1         1         0       9m4s
replicaset.apps/org1-peer1-f86fb5b4b                         1         1         0       9m2s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant