Skip to content
This repository was archived by the owner on Sep 2, 2021. It is now read-only.

drpcli plugins runaction manager buildCatalog does not distinguish between stable and tip #167

@mclamb

Description

@mclamb

When you run drpcli plugins runaction manager buildCatalog the resulting local catalog that gets created and stored at {{ ProvisionerUrl }}/files/rebar-catalog/rackn-catlog.json will contain stable and tip entries for content that both point to the most recent (i.e. tip) actual version of the content.

To reproduce run the following:

drpcli plugins runaction manager buildCatalog
drpcli catalog updateLocal -c rackn-catalog-subset-to-download-locally.json
drpcli plugins runaction manager buildCatalog
jq '.sections.catalog_items."drp-community-content-stable"' /var/drp/drp-data/tftpboot/files/rebar-catalog/rackn-catalog.json

You will see that the stable version of drp-community-content refers to the actual tip version.

The following is the reduced catalog file used for creation as rackn-catalog-subset-to-download-locally.json:

{
  "meta": {
    "Name": "rackn-catalog",
    "Version": "v20.02.16-2",
    "Description": "RackN Catalog",
    "Source": "https://s3-us-west-2.amazonaws.com/rebar-catalog/rackn-catalog.json",
    "Documentation": "",
    "RequiredFeatures": "",
    "Prerequisites": "",
    "Color": "blue",
    "Icon": "book",
    "Author": "RackN",
    "DisplayName": "RackN Catalog",
    "License": "RackN",
    "Copyright": "RackN",
    "CodeSource": "https://s3-us-west-2.amazonaws.com/rebar-catalog/rackn-catalog.json",
    "Order": "2000",
    "Tags": "rackn,catalog,contents,plugins",
    "DocUrl": "https://s3-us-west-2.amazonaws.com/rebar-catalog/rackn-catalog.json",
    "Type": "",
    "Writable": false,
    "Overwritable": false
  },
  "sections": {
    "catalog_items": {
      "drp-community-content-stable": {
        "Validated": false,
        "Available": false,
        "Errors": [],
        "ReadOnly": false,
        "Meta": {
          "Author": "RackN and Digital Rebar Community",
          "CodeSource": "https://github.com/digitalrebar/provision-content",
          "Color": "green",
          "Copyright": "RackN 2019",
          "Description": "Core Provisioning Functionality (Required Libraries)",
          "DisplayName": "Community Core",
          "DocUrl": "https://provision.readthedocs.io/en/latest/doc/content-packages/drp-community-content.html",
          "Icon": "creative commons",
          "License": "APLv2",
          "Name": "drp-community-content",
          "Order": "100",
          "Prerequisites": "BasicStore",
          "Tags": "base,community,linux,APL,quick-start,ssh"
        },
        "Endpoint": "",
        "Id": "drp-community-content-stable",
        "Type": "catalog_items",
        "Name": "drp-community-content",
        "ActualVersion": "v4.2.8",
        "Version": "stable",
        "ContentType": "ContentPackage",
        "Source": "https://s3-us-west-2.amazonaws.com/rebar-catalog/drp-community-content/v4.2.8.json",
        "Shasum256": {
          "any/any": "d1ce505e44f3878dd5879c1e9d876e0a1de71f78b8cff9df894c4b80dd123fa0"
        },
        "NOJQSource": "drp-community-content-stable:::https://s3-us-west-2.amazonaws.com/rebar-catalog/drp-community-content/v4.2.8.json",
        "Tip": false,
        "HotFix": true
      },
      "drp-community-content-tip": {
        "Validated": false,
        "Available": false,
        "Errors": [],
        "ReadOnly": false,
        "Meta": {
          "Author": "RackN and Digital Rebar Community",
          "CodeSource": "https://github.com/digitalrebar/provision-content",
          "Color": "green",
          "Copyright": "RackN 2019",
          "Description": "Core Provisioning Functionality (Required Libraries)",
          "DisplayName": "Community Core",
          "DocUrl": "https://provision.readthedocs.io/en/latest/doc/content-packages/drp-community-content.html",
          "Icon": "creative commons",
          "License": "APLv2",
          "Name": "drp-community-content",
          "Order": "100",
          "Prerequisites": "BasicStore",
          "Tags": "base,community,linux,APL,quick-start,ssh"
        },
        "Endpoint": "",
        "Id": "drp-community-content-tip",
        "Type": "catalog_items",
        "Name": "drp-community-content",
        "ActualVersion": "v4.3.0-alpha2.71+g47bb9dc3f63a6bdd2af246bceac9f720d8985abb",
        "Version": "tip",
        "ContentType": "ContentPackage",
        "Source": "https://s3-us-west-2.amazonaws.com/rebar-catalog/drp-community-content/v4.3.0-alpha2.71%2Bg47bb9dc3f63a6bdd2af246bceac9f720d8985abb.json",
        "Shasum256": {
          "any/any": "ba0746d1237ee2f4222ce8fa79cbcedd35b463554067036e697de2d5ee646e20"
        },
        "NOJQSource": "drp-community-content-tip:::https://s3-us-west-2.amazonaws.com/rebar-catalog/drp-community-content/v4.3.0-alpha2.71%2Bg47bb9dc3f63a6bdd2af246bceac9f720d8985abb.json",
        "Tip": true,
        "HotFix": false
      },
      "drp-community-content-v4.2.8": {
        "Validated": false,
        "Available": false,
        "Errors": [],
        "ReadOnly": false,
        "Meta": {
          "Author": "RackN and Digital Rebar Community",
          "CodeSource": "https://github.com/digitalrebar/provision-content",
          "Color": "green",
          "Copyright": "RackN 2019",
          "Description": "Core Provisioning Functionality (Required Libraries)",
          "DisplayName": "Community Core",
          "DocUrl": "https://provision.readthedocs.io/en/latest/doc/content-packages/drp-community-content.html",
          "Icon": "creative commons",
          "License": "APLv2",
          "Name": "drp-community-content",
          "Order": "100",
          "Prerequisites": "BasicStore",
          "Tags": "base,community,linux,APL,quick-start,ssh"
        },
        "Endpoint": "",
        "Id": "drp-community-content-v4.2.8",
        "Type": "catalog_items",
        "Name": "drp-community-content",
        "ActualVersion": "v4.2.8",
        "Version": "v4.2.8",
        "ContentType": "ContentPackage",
        "Source": "https://s3-us-west-2.amazonaws.com/rebar-catalog/drp-community-content/v4.2.8.json",
        "Shasum256": {
          "any/any": "d1ce505e44f3878dd5879c1e9d876e0a1de71f78b8cff9df894c4b80dd123fa0"
        },
        "NOJQSource": "drp-community-content-v4.2.8:::https://s3-us-west-2.amazonaws.com/rebar-catalog/drp-community-content/v4.2.8.json",
        "Tip": false,
        "HotFix": true
      },
      "drp-community-content-v4.3.0-alpha2.71": {
        "Validated": false,
        "Available": false,
        "Errors": [],
        "ReadOnly": false,
        "Meta": {
          "Author": "RackN and Digital Rebar Community",
          "CodeSource": "https://github.com/digitalrebar/provision-content",
          "Color": "green",
          "Copyright": "RackN 2019",
          "Description": "Core Provisioning Functionality (Required Libraries)",
          "DisplayName": "Community Core",
          "DocUrl": "https://provision.readthedocs.io/en/latest/doc/content-packages/drp-community-content.html",
          "Icon": "creative commons",
          "License": "APLv2",
          "Name": "drp-community-content",
          "Order": "100",
          "Prerequisites": "BasicStore",
          "Tags": "base,community,linux,APL,quick-start,ssh"
        },
        "Endpoint": "",
        "Id": "drp-community-content-v4.3.0-alpha2.71",
        "Type": "catalog_items",
        "Name": "drp-community-content",
        "ActualVersion": "v4.3.0-alpha2.71+g47bb9dc3f63a6bdd2af246bceac9f720d8985abb",
        "Version": "v4.3.0-alpha2.71",
        "ContentType": "ContentPackage",
        "Source": "https://s3-us-west-2.amazonaws.com/rebar-catalog/drp-community-content/v4.3.0-alpha2.71%2Bg47bb9dc3f63a6bdd2af246bceac9f720d8985abb.json",
        "Shasum256": {
          "any/any": "ba0746d1237ee2f4222ce8fa79cbcedd35b463554067036e697de2d5ee646e20"
        },
        "NOJQSource": "drp-community-content-v4.3.0-alpha2.71:::https://s3-us-west-2.amazonaws.com/rebar-catalog/drp-community-content/v4.3.0-alpha2.71%2Bg47bb9dc3f63a6bdd2af246bceac9f720d8985abb.json",
        "Tip": false,
        "HotFix": true
      }
    }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions