Ironic has deprecated these for a while, so we should be notifying
our users of that fact. This change also makes us stop using those
old ramdisks by default so we don't have to build an extra image
during CI runs.
Change-Id: I68d726bf73ba0aa10803a5fd8f523323d1fdd70e
Co-Authored-By: Dan Prince <dprince@redhat.com>
This change switches the overcloud deploy stack polling with event
list polling. This uses the same technique as the recently added
heat stack-create --poll mode: Ib7d35b66521f0ccca8544fd18fb70e04eaf98e5a
There is a (CREATE|UPDATE)_(COMPLETE|FAILED) event generated when the stack
operation is complete, so this is used to decide when to stop polling.
Also, every time there is an event it is printed to the screen in log
style. This would give the user an indication that something is
happening, which is better than staring at nothing for minutes (hours).
On stack update, the oldest event from the previous operation is discovered and
that is used for the marker so that only new events are logged.
Change-Id: I8951b0b924db769961aa67e654fcbd774d3e7787
This patch updates 'overcloud deploy' commands so that
updates (re-running deploy on an existing stack) generate
a unique DeployIdentifier parameter. By passing an unique
DeployIdentifier parameter into the overcloud stack we
force all puppet config tasks (which are idempotent
and safe to exec multiple times) again.
We've had several issues with puppet not-rerunning on
a variety of config related changes and additionally recieved
user feedback that not re-running all puppet deployments on
an update is confusing.
Change-Id: Ia659181872a6537cc169f1d1531ebf5d36160183
Closes-bug: #1505430
Depends-On: Ic352ddd30807dc378e5e7b6c396bc53f5d6d5622
Some time ago ironic-discoverd used to require maintenance mode.
This was changed back in Kilo, and was deprecated in Liberty.
Also cleans up introspection code a bit.
Change-Id: Ib2ea84a8e7f0a42423199cd1db40136ab8495fdc
It's generally recommended that base Exceptions not be raised,
because this makes it impossible to handle exceptions in a more
granular way. except Exception: will catch all exceptions, not
just the one you might care about.
This replaces most instances of this pattern in tripleoclient, with
the exception of the one in overcloud_image.py because I have a
separate change open that already fixes it.
Change-Id: I6fce306c4ffc57b4c52389be1feb583f5a400a64
If the neutron network type is set to 'vlan', then the Neutron tunnel
ranges argument must also be passed.
Change-Id: I82a37db15c034da56c0c2c90146f01aa522226e1
When neutron tunneling is disabled, allow the passing of neutron network type
without the need for neutron tunnel types.
Change-Id: Ib09ef36507ffbe0589c57d1a23ee6da38ffa0e5a
Closes-Bug: #1507556
Remove parameters that have sane defaults in the Heat templates.
In order to change these, one should use an environment file rather
than passing args to the deploy command. These commands should now
be considered deprecated in favor of the environment file.
Change-Id: Idbf85d455f348ed2ab9b34fe1dc95faec427a13f
Depends-On: Ifd740c50ee0e48e0cf50d9ebd9cc282155cb3a6d
Use a property instead of a function. This is more in line with how the
clients are referenced with openstackclient, thereby making it easier
to switch to the Ironic OSC plugin in the future.
Change-Id: I0b4d35f0af6136dd1bce6c6d4202caa52f4c042e
On an openstack overcloud deploy which results in a stack-update,
implicitly include overcloud-resource-registry-puppet.yaml if the user
specifies any other custom environments. Do not include
overcloud-resource-registry-puppet.yaml if the user specifies no extra
environments.
This solution would be an improvement over the current situation, but it
isn't perfect.
It does the right thing when:
- the user does an openstack overcloud with no environments specified
- the user does an openstack overcloud with all custom environments
specified
It will sometimes do the wrong thing when:
- the user specifies a partial list of custom environments (like -e
do_my_custom_oneoff_thing.yaml)
Change-Id: I60fbf2182429f6bb83e000fc4d45269d7f83171b
Related-Bug: #1498607
Closes-Bug: #1504363
Running openstack command with python-tripleoclient under
root user is not supported and should not be allowed. Added
check for user and exit if it is root (EUID=0) to openstack
undercloud install command.
Each command can be disabled for root by adding
utils.ensure_run_as_normal_user() into it's body.
Change-Id: I685c639e02790483d1607c7eac038f8b9b8dc99e
Closes-Bug: rhbz#1239088
The pattern
self.log.error('Some message')
self.log.exception(e)
is redundant and misuses the logging.exception function. The
argument to exception() is supposed to be a string describing the
error that occurred, not the exception itself. It already pulls
the exception details from the exception handler context and
includes them in the output.
This changes the instances of the above pattern to simply
self.log.exception('Some message')
which results in the correct output of something like:
ERROR:root:Some message
Traceback (most recent call last):
File "./test.py", line 23, in <module>
raise Exception('foo')
Exception: foo
Change-Id: Ia55ec34256ceb6f095c2fbfe2d085567f6382509
There is a current effort on tripleo-heat-templates to manage keystone
resources directly via puppet. The effort is separate in two patchset
one to replace the current keystone.initialize() and the other other to
replace setup-endpoints().
This review is necessary in order to make CI pass the upstream jobs.
The whole keystone functions call will be removed then.
Change-Id: Ia4b3244f114dcff746ab89d355ad4933f8fdbddf
The current implementation of the password generation function is
all or nothing. If the file exists, then it uses that file as the
list of passwords, otherwise it generates an entirely new file.
This means that if we add a new service that requires a password to
be generated and a user upgrades with a password file generated by
an older version, we will not generate a new password for the new
service and pandemonium will result.
To address the problem, read in any existing passwords from the file,
but loop through the names to make sure all of the expected passwords
are set. If any are not, generate them. Behavior in the case of
no password file remains unchanged.
Change-Id: Id9c5fe363a2aef55800bee4db12cbf3e2d278e45
Python provides the platform module that can do this for us, and
it will simplify adding support for other distros in the future if
we aren't dependent on a redhat-specific file.
Also changes the exception raised from Exception to RuntimeError
because raising bare Exceptions is frowned upon.
Change-Id: I50d443918d802e94260a14be2f5a4e749e583703
Moves create_overcloudrc and create_tempest_deployer_input to utils.py
because they didn't require the instance information from
DeployOvercloud, and now can be better tested independently.
Depends-On: I98e19cc29d69cbd6636cd4ce77a07c7a0e3dc048
Depends-On: I205569f4be0bcee2b284048dec7ddf0b28bbd8a1
Change-Id: I4a819c4262bde4d38e3f51150413836ca83646a0
3 separate places had hardcoded values for the t-h-t directory. Many
values are/will be shared, this patch consolidates them to avoid having
them diverge in the future.
Depends-On: I98e19cc29d69cbd6636cd4ce77a07c7a0e3dc048
Change-Id: I205569f4be0bcee2b284048dec7ddf0b28bbd8a1
device-mapper-multipath needs to be installed for managing of multipath
devices for scenarios where fail over or load balancing of block devices
is desirable.
This change installs the package by default in the overcloud-full image
for connvenience. The multipathd daemon is not started or enabled nor
any multipath configuration exposed. Those exercises would be left to be
done via the ExtraConfig resources in tripleo-heat-templates.
Change-Id: I5b575fe7728fd58c1fd448b1f4355ee4df7bffb8
fedora-user is an optional image that is only used for testing the
deployed overcloud. We shouldn't force everyone to download it as
part of the --all build when in many cases it won't be needed. The
option to download it is left in the client though so it can still
be easily retrieved when necessary.
Change-Id: I3ea6ad911a6ee411f19379060da127ef0a6e75e3
I consistently have problems building images on an 8 GB VM with
the undercloud already installed (which is the documented flow).
At 4 or 12 GB it works fine, but 8 seems to fall in a sweet spot
where the tmpfs usage of dib causes OOM problems. 4 GB works
because dib doesn't use tmpfs by default with that little memory,
and 12 GB seems to be sufficient to avoid running out of memory
even with tmpfs.
This changes passes the --min-tmpfs 5 parameter to the image build
for the overcloud-full image (the largest image by far) so it will
not attempt to build in tmpfs if there is less than 12 GB of RAM.
5 instead of 6 because due to rounding 6 would result in tmpfs not
being used on 12 GB VMs either (similar to how it is not used on a
4 GB VM even though the default is 2).
Note that tmpfs by default uses half of total memory, which is why
all of the min-tmpfs numbers are half of the expected memory on the
system.
Change-Id: I6254d04216936551e68ac02999f2bffc11b19f65
Because existing heat environment is used (instead of passing whole
environment with each stack-update command), it's possible
that there are some hooks left in the existing environment.
As a short-term solution, we make sure we unset hooks (which are
now set only by package update command).
Change-Id: I9782098fb4be889e63824338b2fdb6c9b1b13bf4
Depends-On: I1cb6c069cf6cf3b5f9504b35ca9538ba99ec405d
Closes-Bug: #1502869