diff options
author | Zuul <zuul@review.opendev.org> | 2023-03-15 15:56:42 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2023-03-15 15:56:42 +0000 |
commit | c5de8cb54b161018b3a1f6b2aa7bd0f94b78bdd6 (patch) | |
tree | 1edc89bb13ac9fd9bc14cd114854b523804a10a1 | |
parent | 0d35927e2c0a010aae92b8f08997b036c318d55a (diff) | |
parent | b0783a8f7d8a7d88eb9e64475b266e91199aa4ba (diff) | |
download | zuul-c5de8cb54b161018b3a1f6b2aa7bd0f94b78bdd6.tar.gz |
Merge "Expose nodepool slot attribute"
-rw-r--r-- | doc/source/job-content.rst | 62 | ||||
-rw-r--r-- | releasenotes/notes/nodepool-slot-2061128253e50580.yaml | 7 | ||||
-rw-r--r-- | zuul/executor/server.py | 1 | ||||
-rw-r--r-- | zuul/model.py | 1 |
4 files changed, 71 insertions, 0 deletions
diff --git a/doc/source/job-content.rst b/doc/source/job-content.rst index d6bb07683..643632d5b 100644 --- a/doc/source/job-content.rst +++ b/doc/source/job-content.rst @@ -669,6 +669,68 @@ of item. - shell: echo example when: zuul_success | bool +.. var:: nodepool + + Information about each host from Nodepool is supplied in the + `nodepool` host variable. Availability of values varies based on + the node and the driver that supplied it. Values may be ``null`` + if they are not applicable. + + .. var:: label + + The nodepool label of this node. + + .. var:: az + + The availability zone in which this node was placed. + + .. var:: cloud + + The name of the cloud in which this node was created. + + .. var:: provider + + The name of the nodepool provider of this node. + + .. var:: region + + The name of the nodepool provider's region. + + .. var:: host_id + + The cloud's host identification for this node's hypervisor. + + .. var:: external_id + + The cloud's identifier for this node. + + .. var:: slot + + If the node supports running multiple jobs on the node, a unique + numeric ID for the subdivision of the node assigned to this job. + This may be used to avoid build directory collisions. + + .. var:: interface_ip + + The best IP address to use to contact the node as determined by + the cloud provider and nodepool. + + .. var:: public_ipv4 + + A public IPv4 address of the node. + + .. var:: private_ipv4 + + A private IPv4 address of the node. + + .. var:: public_ipv6 + + A public IPv6 address of the node. + + .. var:: private_ipv6 + + A private IPv6 address of the node. + Change Items ~~~~~~~~~~~~ diff --git a/releasenotes/notes/nodepool-slot-2061128253e50580.yaml b/releasenotes/notes/nodepool-slot-2061128253e50580.yaml new file mode 100644 index 000000000..c7ba3e1dc --- /dev/null +++ b/releasenotes/notes/nodepool-slot-2061128253e50580.yaml @@ -0,0 +1,7 @@ +--- +features: + - | + The :var:`nodepool.slot` variable has been added to host vars. + This is supplied by the nodepool static and metastatic drivers + starting with version 8.0.0. It may be used to avoid build + directory collisions on nodes that run more than one job. diff --git a/zuul/executor/server.py b/zuul/executor/server.py index a49bbbbbf..0d2d95361 100644 --- a/zuul/executor/server.py +++ b/zuul/executor/server.py @@ -1931,6 +1931,7 @@ class AnsibleJob(object): region=node.region, host_id=node.host_id, external_id=getattr(node, 'external_id', None), + slot=node.slot, interface_ip=node.interface_ip, public_ipv4=node.public_ipv4, private_ipv4=node.private_ipv4, diff --git a/zuul/model.py b/zuul/model.py index e526b749c..5be5923a5 100644 --- a/zuul/model.py +++ b/zuul/model.py @@ -1408,6 +1408,7 @@ class Node(ConfigObject): self.private_ipv6 = None self.connection_port = 22 self.connection_type = None + self.slot = None self._keys = [] self.az = None self.provider = None |