stackabletech / stackabletech/airflow-operator

Initial failed deployment can not be fixed

Aperta
#147 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
Rust
Stelle
32
Fork
6
Merge medio
1g 7h
PR unite (30g)
13

Descrizione

Affected version

0.5.0-nightly

Current and expected behavior
  • stackablectl --namespace=stackable operator install airflow
    
  • helm repo add bitnami https://charts.bitnami.com/bitnami
    
  • helm install airflow-postgresql bitnami/postgresql --version 11.0.0 \
    --set auth.username=airflow \
    --set auth.password=airflow \
    --set auth.database=airflow
    
  • helm install redis bitnami/redis \
    --set auth.password=redis
    
  • Wait for all ressources are deployed

  • create airflow file

  • # airflow.yml
    apiVersion: v1
    kind: Secret
    metadata:
      name: simple-airflow-credentials
    type: Opaque
    stringData:
      adminUser.username: airflow
      adminUser.firstname: Airflow
      adminUser.lastname: Admin
      adminUser.email: airflow@airflow.com
      adminUser.password: airflow
      connections.secretKey: thisISaSECRET_1234
      connections.sqlalchemyDatabaseUri: postgresql+psycopg2://airflow:airflow@airflow-postgresql.WRONG-VALUE.svc.cluster.local/airflow
      connections.celeryResultBackend: db+postgresql://airflow:airflow@airflow-postgresql.WRONG-VALUE.svc.cluster.local/airflow
      connections.celeryBrokerUrl: redis://:redis@redis-master:6379/0
    
    ---
    apiVersion: airflow.stackable.tech/v1alpha1
    kind: AirflowCluster
    metadata:
      name: airflow
    spec:
      version: 2.2.4-python3.9-stackable0.3.0
      statsdExporterVersion: v0.22.4
      executor: CeleryExecutor
      loadExamples: true
      exposeConfig: false
      credentialsSecret: simple-airflow-credentials
      webservers:
        roleGroups:
          default:
            replicas: 1
      workers:
        roleGroups:
          default:
            replicas: 2
      schedulers:
        roleGroups:
          default:
            replicas: 1
    
  •   kubectl apply -f airflow.yml
    

This config has a bug (wrong database url)

The operator now tries to deploy airflow but the database init fails.
After seven retries all the retries are done and we are in a failure state.
Now I deleted the deployment with
kubectl delete -f airflow.yml

After that i fixed the bug and run kubectl apply -f airflow.yml. This does not try again the database init and just goes to error state.

My expected behavior would be that the database init would tried again and succeeds this time.

Possible solution

Delete the airflow operator and the Custom ressource definition and reinstall the operator. Then apply the correct yaml file. This time the database init succeeds.

Additional context

No response

Environment

Client Version: v1.22.4
Server Version: v1.23.9

Would you like to work on fixing this bug?

No response

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Usa airflow.yml e il percorso di riconciliazione di AirflowCluster come punto di ingresso; riproduci l'inizializzazione fallita di PostgreSQL, elimina la risorsa e riapplicala, quindi analizza come l'operatore registra il fallimento terminale dopo i suoi tentativi. Il lavoro è completato quando la correzione della connessione e la nuova applicazione fanno sì che l'inizializzazione del database e il deployment del cluster vengano ritentati e abbiano successo senza reinstallare l'operatore o il suo CRD.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
kubernetes, postgresql, redis, rust
Ambito
databases, infrastructure
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.