Probably should have happened a long time ago [1]. netstat doesn't
come out-of-the-box with some distributions these days.
[1] https://lwn.net/Articles/710533/
Change-Id: Idcd2099cca715837a3ad9bd595fa8f08531ef863
* Prefer modern SSH key algorithms
* Generate an ECDSA key if Cirros is used
* Always resolve symlinks when copying logs
Remove all previous work-arounds.
Change-Id: Ie9248584c71f7d326d5839710d6b9bdf6d779749
Make the HTTP directory not world readable by default.
Images may contain secrets, so regular users should not read them.
Add nginx and dnsmasq to the ironic group so that they can read ironic
files that are group accessible.
Change-Id: Iaa8585fb48e5db6c0d5063dca0d84c9d2300f0c9
It is recommended to pass the same variables (e.g. testing) to other
commands and playbooks, the new file makes it possible.
Change-Id: I2adc4e2dcfd8555b2c9e6c3bf0f512f603367091
There is no guarantee that /var is not on a separate filesystem. Also
we should not pollute the root directory with our stuff.
The TFTP directory /tftpboot is left where it is, since it needs to be
accessed by dnsmasq. We may consider moving it later on.
Removes the wildly outdated statement about purging the image cache
from the documentation.
Change-Id: Ib1e46e7a9c5eec193082858614026ca4c9f537ac
Trapping on ERR does not do what is implied here and is redundant when
trapping on EXIT is used together with `set -e`. The real problem is
that in the CI scripts we pipe test-bifrost.sh into tee with a log file
without setting -o pipefail in bash. This change fixes it.
This reverts commit b31bc66726.
Change-Id: Ifca4049f5967c0b2153ecffb4c153a96b4a62cc7
Using the emperor mode of uWSGI is redundant now that we depend on
systemd. This change switches uWSGI Keystone to systemd template services
based on the recipe from the uWSGI documentation [1].
A new role is created to encapsulate the uWSGI login in anticipation of
switching Ironic API to uWSGI as well. Reduce repetition in Keystone.
[1] https://uwsgi-docs.readthedocs.io/en/latest/Systemd.html
Change-Id: I50bc3f7a4faf14c36b92e7656b7149e9c833c85e
Currently ironic logs into files, other services - into journald. Ramdisk
logs are for some reason stored with data rather than in /var/log.
This change makes all services log into journald and changes to standard paths
for ramdisk logs (making them available in the CI as a side effect).
Change-Id: I8b3c7750596602c2609798ffbb7e274e2c18b40f
They have not been stored previously because the logs collector was not
enabled. Also use the standard location for logs and save them in the CI.
Change-Id: I034a5fffb982a848ceda3db6635da841f869111e
This patch fixes collection of logs adding sudo to commands that
need that.
Also adds collection of some more useful info for libvirt
and qemu, for example increasing the log verbosity of libvirt.
Reordered commands to divide them by section.
Change-Id: I86ae0dac8de63449405012a99ddf94f915b304b0
Virtualbmc 2.0 dropped the daemon autostart feature. This means we need
to explicitly start it. Running it as a Systemd unit, code adapted from
Tenks.
In order to allow Systemd to execute the daemon on systems with SELinux
enabled, it must be installed to the system rather than a virtualenv.
Change-Id: I66e8e5f5a9c16ac90e132074c826d508458ae4d1
If user runs scripts without VENV defined, then an error
"unbound variable" will be received. This patch fixes this issue
Change-Id: I22b817ad7b945509bb2e89d0467df53975434313
This corrects the path handling in the CI and removes a lot of
redundancy in the CI definitions. Also adds fixed log collection
from https://review.opendev.org/#/c/649526/ to make the CI pass.
Removes handling of ZUUL_CHANGES. It is not present in new jobs,
and its use case in Bifrost is completely unclear.
Eventually, we should rewrite the whole test-bifrost.sh in ansible,
but that's a much bigger task.
Change-Id: Id893e816a7806e7d75282628817288d8a34ab8af
The ipxe file can have different extensions based on the distro.
Changing from .pxe to generic extension should cover them all.
Change-Id: I6da5bf86a022315861d140029ce25321a5b57469
We make the following changes in order to support openSUSE Leap 15.0
- Updates the bindep.txt file to match the SUSE family.
- The netstat binary has been moved to net-tools-deprecated
package.
- We fix a bug when checking the status to extra dependencies. The
variable is an array, but the code was only checking the first
entry of the array.
- Replace spaces with '_' on ansible_distribution since openSUSE Leap
15.0 is being reported as 'openSUSE Leap' by Ansible.
Change-Id: I800331e29e0d47a3121229cd66a5814277e34b84
We're not capturing the logs as we likely can't
copy the contents of the folder. So lets use
sudo to exec the cp command, and for good measure
we'll pull a list in case there just is nothing
present to be uploaded for logs
Change-Id: I73ad58037518e6d334efe0bad99458a2fabfc047
The [[:digit:]] does not work correctly when using sudo
2018-10-04 14:31:33.319558 | opensuse-423 | + sudo cp '/var/log/libvirt/baremetal_logs/testvm[[:digit:]]_console.log' /home/zuul/workspace/logs
2018-10-04 14:31:33.328756 | opensuse-423 | cp: cannot stat '/var/log/libvirt/baremetal_logs/testvm[[:digit:]]_console.log': No such file or directory
As we can see [[:digit:]] is not expanded so no logs are collected. This
is because the expansion happens by the user but since he does not have
access to the directory the command fails. We can fix this by opening a
subshell so it gets run with sudo privileges.
Change-Id: Ibdf8606a3b72c48faffdf2b58b122b690008ba98
Sometimes we need to troubleshoot CI a little more,
So lets preserve IPA failure logs so we can investigate further.
Change-Id: I47e7f45e65997a61e41c73e072e3c8c31ef9a244
Always exit with success code when collecting various logs. This allows
this script to be used to collect partial logs in case a deployment
fails since it may help with debugging the root cause of the failure.
Change-Id: I4d5a2c71303e9ed466b5fd5dbc63469677f2380f
The scripts/collect-test-info.sh script is executed with '-u' which means
that unset variables will trigger an error like the following one:
scripts/collect-test-info.sh: line 16: TEST_VM_NODE_NAMES: unbound variable
We handle this case by simply setting an alternative value when the variable is set
in order to treat the unset variable gracefully.
Change-Id: Ic4b450fe8654568e30eacb00aeff128d675ed616
The change I4c9eec82882d94649ee0e6bdb7e2ce033c29e44a introduced the
ability to create VMs with user defined names. This change aligns
the VM log collection accordingly.
Change-Id: I8c4895a8f49749b6845a804b02ad64bc227ec3ec
Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
Somewhere along the way we lost the ability to read the
conductor, api, and baremetal log files that we retained
for storage as CI test results. This revision resets
the permissions so any user can read the file since
we can't make assumptions about the webserver user.
Change-Id: Idc36f736f9e54a69348045988483559b88e51980
Presently the post-test information collection script is only
collecting a single test virtual machine's console log.
As the DHCP test operates with multiple VMs, we need to collect
all console logs to help identify potential test failures.
Change-Id: I8ddfb7870ea57b51f6340db4ba388c13cc35c059
Corrected the netstat data collection as the --version flag causes
a non-zero exit code with netstat.
Added interface counter data collection to allow for additional
troubleshooting context.
Change-Id: I7e0e26cc735d6c0ad9052547bc0eefe3ed3877ae
Logs from test runs on systemd systems were not being
collected properly. Allow logs to be collected from
systemd if available and fall back to the upstart
location. Also, only collect information from netstat
and iptables if present.
Change-Id: I000c3d0c7d576eeb4ab051f68a6fef8a83dc06fb
Closes-Bug: #1470128