Comment 3 for bug 1832608

Revision history for this message
David (davigar15) wrote :

Hello, the bug wasn't fixed for me. The service name is still empty. I add the steps to reproduce it:

Fresh machine, Ubuntu Bionic

STEPS:
```
sudo snap install microk8s --classic
sudo snap install juju --classic --channel 2.6/edge
microk8s.status --wait-ready
microk8s.enable dashboard storage dns
sudo alias microk8s.kubectl kubectl
juju bootstrap microk8s
juju add-model osm
juju create-storage-pool operator-storage kubernetes storage-class=microk8s-hostpath
juju create-storage-pool osm-pv kubernetes storage-class=microk8s-hostpath
juju deploy cs:~charmed-osm/mongodb-k8s --channel edge -n 3

# Wait...
juju status --color

Model Controller Cloud/Region Version SLA Timestamp
osm microk8s-localhost microk8s/localhost 2.6.4 unsupported 17:50:42Z

App Version Status Scale Charm Store Rev OS Address Notes
mongodb-k8s active 3 mongodb-k8s jujucharms 12 kubernetes 10.152.183.40

Unit Workload Agent Address Ports Message
mongodb-k8s/0* active idle 10.1.1.10 27017/TCP configured
mongodb-k8s/1 active idle 10.1.1.11 27017/TCP configured
mongodb-k8s/2 active idle 10.1.1.12 27017/TCP configured

kubectl -n osm get all
^[[A^[[A
NAME READY STATUS RESTARTS AGE
pod/mongodb-k8s-0 1/1 Running 0 7m20s
pod/mongodb-k8s-1 1/1 Running 0 7m20s
pod/mongodb-k8s-2 1/1 Running 0 7m20s
pod/mongodb-k8s-operator-0 1/1 Running 0 7m39s

NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/mongodb-k8s ClusterIP 10.152.183.40 <none> 27017/TCP 7m20s

NAME READY AGE
statefulset.apps/mongodb-k8s 3/3 7m20s
statefulset.apps/mongodb-k8s-operator 1/1 7m39s

kubectl -n osm get statefulsets.apps mongodb-k8s -o yaml
apiVersion: apps/v1
kind: StatefulSet
metadata:
  annotations:
    juju-app-uuid: 190b64ca
    juju.io/controller: 21bea588-f0a5-49e7-8776-f5da0a62ea3e
    juju.io/model: b13f5d92-72ce-4777-86bd-9b320b30f4cd
  creationTimestamp: "2019-06-13T17:45:36Z"
  generation: 1
  name: mongodb-k8s
  namespace: osm
  resourceVersion: "816"
  selfLink: /apis/apps/v1/namespaces/osm/statefulsets/mongodb-k8s
  uid: 0d01c190-8e03-11e9-a2f8-fa163e81b8c7
spec:
  podManagementPolicy: Parallel
  replicas: 3
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      juju-app: mongodb-k8s
  serviceName: ""
  template:
    metadata:
      annotations:
        apparmor.security.beta.kubernetes.io/pod: runtime/default
        juju.io/controller: 21bea588-f0a5-49e7-8776-f5da0a62ea3e
        juju.io/model: b13f5d92-72ce-4777-86bd-9b320b30f4cd
        seccomp.security.beta.kubernetes.io/pod: docker/default
      creationTimestamp: null
      labels:
        juju-app: mongodb-k8s
    spec:
      containers:
      - command:
        - mongod
        - --replSet
        - rs0
        - --bind_ip
        - 0.0.0.0
        env:
        - name: ALLOW_ANONYMOUS_LOGIN
          value: "yes"
        image: registry.jujucharms.com/charmed-osm/mongodb-k8s/mongodb-image@sha256:05f12b17aa35948848c0d3f0198ce10c7f3e37438724911d0d8f9b6643535599
        imagePullPolicy: IfNotPresent
        name: mongodb-k8s
        ports:
        - containerPort: 27017
          protocol: TCP
        resources: {}
        securityContext:
          allowPrivilegeEscalation: false
          procMount: Default
          readOnlyRootFilesystem: false
          runAsNonRoot: false
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /data/db
          name: database-190b64ca
      dnsPolicy: ClusterFirst
      imagePullSecrets:
      - name: mongodb-k8s-mongodb-k8s-secret
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      terminationGracePeriodSeconds: 30
  updateStrategy:
    rollingUpdate:
      partition: 0
    type: RollingUpdate
  volumeClaimTemplates:
  - metadata:
      annotations:
        juju-storage: database
        juju-storage-owner: mongodb-k8s
        juju.io/controller: 21bea588-f0a5-49e7-8776-f5da0a62ea3e
        juju.io/model: b13f5d92-72ce-4777-86bd-9b320b30f4cd
      creationTimestamp: null
      name: database-190b64ca
    spec:
      accessModes:
      - ReadWriteOnce
      resources:
        requests:
          storage: 1Gi
      storageClassName: microk8s-hostpath
      volumeMode: Filesystem
    status:
      phase: Pending
status:
  collisionCount: 0
  currentReplicas: 3
  currentRevision: mongodb-k8s-66b6948477
  observedGeneration: 1
  readyReplicas: 3
  replicas: 3
  updateRevision: mongodb-k8s-66b6948477
  updatedReplicas: 3

```