On K8S I'm seeing this:
# spicedb
t
On K8S I'm seeing this:
Copy code
spicedbprod-migrate-n654hf8h5bfh65b-ln86z          1/2     NotReady   1          10m
and when looking into the status I see this:
Copy code
tatus:
  Conditions:
    Last Transition Time:  2024-09-05T20:04:31Z
    Message:               no TLS configured, consider setting "tlsSecretName"
    Reason:                WarningsPresent
    Status:                True
    Type:                  ConfigurationWarning
    Last Transition Time:  2024-09-05T20:04:31Z
    Message:               Migrating postgres datastore to add-rel-by-alive-resource-relation-subject
    Reason:                MigrationJobRunning
    Status:                True
    Type:                  Migrating
  Image:                   ghcr.io/authzed/spicedb:v1.33.1
  Migration:               add-rel-by-alive-resource-relation-subject
  Observed Generation:     1
  Secret Hash:             ddd
  Target Migration Hash:   ddd
  Version:
    Attributes:
      migration
    Channel:  stable
    Name:     v1.33.1
Events:       <none>
can I disable the TLS? is that why it's not ready?
e
thw two conditions are orthogonal, you'll want to look at the
Job
object for the migrations and see if it's having some issue starting up
the TLS message is just a warning that running without TLS enabled is not recommended
is this a new install or an upgrade?
t
new install
let me check the job
e
usually an issue like this will be something with the connection to the DB and the job logs will tell you what's up
but it could also be a scheduling issue in kube, etc
t
Copy code
Name:             spicedbprod-migrate-n654hf8h5bfh65b
Namespace:        prod
Selector:         batch.kubernetes.io/controller-uid=b6fbc1b8-53ae-4511-ba42-f1260160a39d
Labels:           authzed.com/cluster=spicedbprod
                  authzed.com/cluster-component=migration-job
                  authzed.com/managed-by=operator
Annotations:      authzed.com/spicedb-migration: n654hf8h5bfh65bh57fh668h97hf7q
Parallelism:      1
Completions:      1
Completion Mode:  NonIndexed
Start Time:       Thu, 05 Sep 2024 16:04:31 -0400
Pods Statuses:    1 Active (0 Ready) / 0 Succeeded / 0 Failed
Pod Template:
                  migrate
      add-rel-by-alive-resource-relation-subject
    Environment:
      SPICEDB_LOG_LEVEL:                 debug
      SPICEDB_DATASTORE_CONN_URI:        <set to the key 'datastore_uri' in secret 'prod-spicedb-config'>      Optional: false
      SPICEDB_SECRETS:                   <set to the key 'migration_secrets' in secret 'prod-spicedb-config'>  Optional: true
      SPICEDB_DATASTORE_ENGINE:          postgres
      SPICEDB_DISPATCH_CLUSTER_ENABLED:  true
      SPICEDB_TERMINATION_LOG_PATH:      /dev/termination-log
    Mounts:
      /etc/podannotations from podannotations (rw)
      /etc/podlabels from podlabels (rw)
  Volumes:
   podname:
    Type:  DownwardAPI (a volume populated by information about the pod)
    Items:
      metadata.name -> name
   podlabels:
    Type:  DownwardAPI (a volume populated by information about the pod)
    Items:
      metadata.labels -> labels
   podannotations:
    Type:  DownwardAPI (a volume populated by information about the pod)
    Items:
      metadata.annotations -> annotations
Events:
  Type    Reason            Age   From            Message
  ----    ------            ----  ----            -------
  Normal  SuccessfulCreate  16m   job-controller  Created pod: spicedbprod-migrate-n654hf8h5bfh65b-ln86z
The logs for the migirate container:
Copy code
{"level":"debug","pgx":{"args":["add-rel-by-alive-resource-relation-subject","add-tuned-gc-index"],"commandTag":"UPDATE 1","pid":950,"sql":"UPDATE alembic_version SET version_num=$1 WHERE version_num=$2","time":0.745593},"time":"2024-09-05T20:04:34Z","message":"Query"}
{"level":"debug","pgx":{"args":[],"commandTag":"COMMIT","pid":950,"sql":"commit","time":1.537907},"time":"2024-09-05T20:04:34Z","message":"Query"}
{"level":"debug","pgx":{"args":[],"commandTag":"SELECT 1","pid":950,"sql":"SELECT version_num from alembic_version","time":0.689292},"time":"2024-09-05T20:04:34Z","message":"Query"}
@ecordell I also see this in the operator log after applying the CRD:
Copy code
E0905 20:28:36.904837       1 handler.go:31] "requeueing after api error" err="Operation cannot be fulfilled on spicedbclusters.authzed.com \"spicedbprod0\": the object has been modified; please apply your changes to the latest version and try again" syncID="jtdD7" controller="spicedbclusters" obj={"name":"spicedbprod0","namespace":"prod"}
E0905 20:28:36.972425       1 handler.go:31] "requeueing after error" err="Operation cannot be fulfilled on spicedbclusters.authzed.com \"spicedbprod0\": the object has been modified; please apply your changes to the latest version and try again" syncID="zWC8Z" controller="spicedbclusters" obj={"name":"spicedbprod0","namespace":"prod"}
@ecordell can u check again
31 Views