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

REST API: allow to fetch deployment/config status #2187

Closed
Thomas-Gelf opened this issue Oct 7, 2020 · 1 comment
Closed

REST API: allow to fetch deployment/config status #2187

Thomas-Gelf opened this issue Oct 7, 2020 · 1 comment
Milestone

Comments

@Thomas-Gelf
Copy link
Contributor

Thomas-Gelf commented Oct 7, 2020

I want to call director/config/deployment-status to fetch the following information:

  • stage name currently active in Icinga
  • config checksum related to that stage name
  • activity log checksum related to that configuration
{
    "active_configuration": {
        "stage_name": "efc5e4b9-917b-4bef-8bb1-a20df25423d0",
        "config": "8de97b72fc5fd0035710f7c43684c8d9c1e2c1e4",
        "activity": "7e43cd096954324da4d282ebe530c0b89d2ba909"
    }
}

This should throw 500 in case Icinga isn't reachable. In case there is no active stage name related to the Director, active_configuration must be set to null.

When I pass one or more config_checksums, I also want to be able to distinct the following states:

  • whether this configuration is currently active
  • whether this configuration has ever been deployed
  • whether this configuration has been deployed, but failed
  • whether this configuration has been rendered, but not yet deployed, therefore it's undeployed
  • whether this configuration checksum is completely unknown

Same goes for activitylog_checksum:

{
    "active_configuration": { /* ... */ },
    "configs": {
        "f7c4368de97b72fc5fd003571084c8d9c1e2c1e4": "unknown",
        "8de97b72fc5fd0035710f7c43c1e2c1e684c8d94": "active",
        "8d3684ce97b72fc5fd0035710f72c1ec48d9c1e4": "<unknown|undeployed|deployed|failed|active>",
    },
    "activites": {
        "7e43cd096954324da4d282ebe530c0b89d2ba909": "<unknown|undeployed|deployed|failed|active>"
    }
}
@Thomas-Gelf Thomas-Gelf added this to the 1.8.0 milestone Oct 7, 2020
Thomas-Gelf added a commit that referenced this issue Oct 7, 2020
* this also adds director/config/deployment-status

refs #2187
@Thomas-Gelf Thomas-Gelf assigned arioch and unassigned arioch Oct 7, 2020
Thomas-Gelf added a commit that referenced this issue Oct 7, 2020
* this also adds director/config/deployment-status

refs #2187
@Thomas-Gelf
Copy link
Contributor Author

Implemented with #2188, thanks @gianlucapiccolo!

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

No branches or pull requests

2 participants