When we update the UndercloudHostsEnries we basically
take the output of 'getent hosts "$(hostname -s).ctlplane"'
and push it into a parameter, so tripleo-ansible can
make sure it adds the hostentry for the undercloud on
the whole overcloud.
The problem is that getent hosts can return multiple
entries, which will then be injected into the parameter
and then written into /etc/hosts. This contstantly adds the
undercloud.ctlplane string and we end up adding it at
everydeploy making it grow quadratically.
This eventually leads to a too large json file and the deploys
start failing with: heat.common.exception.RequestLimitExceeded:
Request limit exceeded: JSON body size (4396634 bytes)
exceeds maximum allowed size (4194304 bytes).
Tested this by deploying an environment and then running
a few redeploys to make sure that the undercloud entries
in /etc/hosts on the undercloud itself do not grow at
each redeploy.
NB: Non 100% clean backport due to different context around imports
Change-Id: I37d75600825f48be9e15470cacba7b3a0371a3e2
Closes-Bug: #1887165
(cherry picked from commit 2873dd4df62f104bef6a9ce36bdf5385b75b96b5)
(cherry picked from commit a06c7194c0027a144fce0551870d85f27c6848bd)
Reviewed: https:/ /review. opendev. org/740543 /git.openstack. org/cgit/ openstack/ python- tripleoclient/ commit/ ?id=29686a6564b 333c8814e081233 418228eb234a86
Committed: https:/
Submitter: Zuul
Branch: stable/train
commit 29686a6564b333c 8814e0812334182 28eb234a86
Author: Michele Baldessari <email address hidden>
Date: Fri Jul 10 15:19:45 2020 +0200
Cleanup UndercloudHosts Entries
When we update the UndercloudHosts Enries we basically
take the output of 'getent hosts "$(hostname -s).ctlplane"'
and push it into a parameter, so tripleo-ansible can
make sure it adds the hostentry for the undercloud on
the whole overcloud.
The problem is that getent hosts can return multiple ctlplane string and we end up adding it at
entries, which will then be injected into the parameter
and then written into /etc/hosts. This contstantly adds the
undercloud.
everydeploy making it grow quadratically.
This eventually leads to a too large json file and the deploys
heat.common. exception. RequestLimitExc eeded:
start failing with:
Request limit exceeded: JSON body size (4396634 bytes)
exceeds maximum allowed size (4194304 bytes).
Tested this by deploying an environment and then running
a few redeploys to make sure that the undercloud entries
in /etc/hosts on the undercloud itself do not grow at
each redeploy.
NB: Non 100% clean backport due to different context around imports
Change-Id: I37d75600825f48 be9e15470cacba7 b3a0371a3e2 bef6a9ce36bdf53 85b75b96b5) 44fce0551870d85 f27c6848bd)
Closes-Bug: #1887165
(cherry picked from commit 2873dd4df62f104
(cherry picked from commit a06c7194c0027a1