Uploaded image for project: 'National Data Service'
  1. National Data Service
  2. NDS-703

Promdash deployment via Ansible is not idempotent

    XMLWordPrintableJSON

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • None
    • None
    • Infrastructure
    • None
    • NDS Sprint 16, NDS Sprint 17

    Description

      A prime example of something that is not idempotent and could be:

      ###########################
      #   Prometheus Dashboard
      ###########################
      - name: Prometheus Dashboard status
        command: kubectl get svc prometheus --namespace=kube-system
        register: promdash
        failed_when: promdash.rc < 0
       
      - name: PushGateway status
        command: kubectl get svc pushgateway --namespace=kube-system
        register: pushgateway
        failed_when: pushgateway.rc < 0
       
      - name: Cluster Metrics - Prometheus Dashboard| create prometheus stack
        command: kubectl create --namespace=kube-system -f "/tmp/prometheus-service.json" -f "/tmp/pushgateway-service.json" -f "/tmp/prometheus-all.json"
        when: enablepromdash is defined and (promdash.rc != 0 or pushgateway.rc != 0)

      This code fails due to a typo in the final "when" clause (the OR should be an AND)
      Fixing the typo makes this segment idempotent.

      This ticket is complete when the change has been made.

      Gliffy Diagrams

        Attachments

          Issue Links

            Activity

              People

                lambert8 Sara Lambert
                lambert8 Sara Lambert
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Time Tracking

                    Estimated:
                    Original Estimate - 2 hours
                    2h
                    Remaining:
                    Remaining Estimate - 2 hours
                    2h
                    Logged:
                    Time Spent - Not Specified
                    Not Specified

                    Tasks