Commit Graph

80 Commits

Author SHA1 Message Date
Jiping Ma 2b1651f1d5 kdump-tools: fix oom issue during kdump
The kdump initramfs has included NIC device drivers such as ice, iavf,
i40e, mlx5* and the like. Loading these drivers in a kdump environment
is problematic, because these drivers are known to consume a lot of
memory.

In addition, the systemd-sysctl.service systemd unit causes the
following sysctl to be set, which forces the kernel to keep more than
1 GiB of free memory, which results in out-of-memory conditions:
"vm.min_free_kbytes=1179648".

All of these introduce a possibility of not being able to collect a
vmcore file after a kernel crash. There is a need to exclude
unnecessary NIC drivers from the kdump environment and prevent the
sysctl settings from taking place to make vmcore collection more
reliable.

Verification:
- build-pkgs; build-iso; install and boot up on aio-sx lab.
- All these backlist drivers are not loaded in kdump kernel.

Closes-Bug: 2038804

Signed-off-by: M. Vefa Bicakci <vefa.bicakci@windriver.com>
Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
Change-Id: I820280b1674d09f42b6abfc25bfa07f44b4f7b44
2023-10-10 21:42:23 -04:00
Peng Zhang 470193ffc9 kdump-tools: disable AER to fix kdump hung issue
This issue is detected after kernel updated from 5.10.112 version to
5.10.152 version. Bad commit is d83d886e69bd (PCI/ERR: Recover from
RCEC AER errors) which comes from linux-yocto 5.10 stable tree. It
will lead to board hang up after triggering kdump.

This issue can be reproduced on board whose name is Supermicro
A2SDi-16C-TP8F, bios version is 1.4 and build date is 01/29/2021.

We don't need pci AER functionality enabled in the kdump kernel, and it
causes some boards to hang in certain situations as kernel AER error log
shows. So we just disable it.

KERNEL AER ERROR LOG:
[    7.409296] pcieport 0000:00:05.0: AER: Multiple Corrected error
received: 0000:00:05.0
[    7.417311] BUG: kernel NULL pointer dereference, address:
0000000000000028
[    7.418296] #PF: supervisor read access in kernel mode
[    7.418296] #PF: error_code(0x0000) - not-present page
[    7.418296] PGD 0 P4D 0
[    7.418296] Oops: 0000 [#1] PREEMPT SMP NOPTI
[    7.418296] CPU: 0 PID: 93 Comm: irq/25-aerdrv Not tainted
5.10.0-6-amd64 #1 Debian 5.10.152-1.stx.25
[    7.418296] Hardware name: Supermicro
SYS-E300-9A-16CN8TP/A2SDi-16C-TP8F, BIOS 1.4 01/29/2021
[    7.418296] RIP: 0010:pci_walk_bus+0x25/0x90
[    7.418296] Code: 00 00 00 00 00 0f 1f 44 00 00 41 56 41 55 49 89 fd
48 c7 c7 20 37 9a 99 41 54 49 89 f4 55 48 89 d5 53 4c 89 eb e8 2b 5a 56
00 <49> 8b 7d 28 eb 1f 48 8b 47 18 48 85 c0 74 31 4c 8b 70 28 48 89 c3
[    7.418296] RSP: 0000:ffffa60040173dc8 EFLAGS: 00010282
[    7.418296] RAX: ffff8b553fded001 RBX: 0000000000000000 RCX:
0000000000000000
[    7.418296] RDX: ffff8b553fded000 RSI: ffffffff9833c6e0 RDI:
ffffffff999a3720
[    7.418296] RBP: ffffa60040173e10 R08: 0000000000000002 R09:
ffffa60040173d74
[    7.418296] R10: 0000000000000001 R11: 0000000000000000 R12:
ffffffff9833c6e0
[    7.418296] R13: 0000000000000000 R14: 0000000000000028 R15:
ffff8b555e206328
[    7.418296] FS:  0000000000000000(0000) GS:ffff8b55bec00000(0000)
knlGS:0000000000000000
[    7.418296] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    7.418296] CR2: 0000000000000028 CR3: 000000087d80a000 CR4:
00000000003506f0
[    7.418296] Call Trace:
[    7.418296]  find_source_device+0x34/0x5a
[    7.418296]  aer_isr.cold+0x89/0x9e
[    7.418296]  ? __set_cpus_allowed_ptr+0xb6/0x220
[    7.418296]  ? disable_irq_nosync+0x10/0x10
[    7.418296]  irq_thread_fn+0x20/0x60
[    7.418296]  irq_thread+0x104/0x1b0
[    7.418296]  ? irq_finalize_oneshot.part.0+0xe0/0xe0
[    7.418296]  ? irq_thread_check_affinity+0xa0/0xa0
[    7.418296]  kthread+0x133/0x150
[    7.418296]  ? __kthread_bind_mask+0x60/0x60
[    7.418296]  ret_from_fork+0x22/0x30
[    7.418296] Modules linked in:
[    7.418296] CR2: 0000000000000028

TEST PLAN:
PASS: build-pkgs -c -p kdump-tools
PASS: build-pkgs -c -p kdump-tools-rt
PASS: boot
PASS: on troublesome and non-troublesome platform
      systemctl enable kdump-tools.service
      systemctl start kdump-tools.service
      echo 1 >/proc/sysrq-trigger
      echo 'c' > /proc/sysrq-trigger
      vmcore has been created successfully
      system boots back up automatically

Closes-Bug: 1999646

Change-Id: I9ffc6e96d4b7fbd0b29a806d4d96dfc8e89dc4c6
Signed-off-by: Peng Zhang <Peng.Zhang2@windriver.com>
2022-12-17 08:38:58 +08:00
Zuul d05902e7e5 Merge "CentOS: kdump: remove unnecessary bootargs" 2022-12-01 11:00:40 +00:00
Jiping Ma aafd8aba48 CentOS: kdump: remove unnecessary bootargs
The 5.10.74 preempt-rt kernel reports the following warning when
dumping vmcore files due to the use of kernel command line arguments
such as nohz_full=, isolcpus=, rcu_nocbs= with the kexec/kdump kernel.

[    1.568059] WARNING: CPU: 0 PID: 0 at kernel/time/tick-sched.c:139
tick_sched_do_timer+0x5e/0x70
[    1.568064] Modules linked in:
[    1.568066] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G          I
5.10.74-200.1648.tis.rt.el7.x86_64 #1
[    1.568068] Hardware name: Dell Inc. PowerEdge R740/0WRPXK, BIOS
2.10.2 02/24/2021
[    1.568068] RIP: 0010:tick_sched_do_timer+0x5e/0x70
[    1.568071] Code: 01 00 75 26 89 15 26 74 6f 01 48 8b 05 1b 87 d5 01

Commit 1655ee30e6("sched/isolation: really align nohz_full with
rcu_nocbs") is included in the 5.10.112 kernel, that had fixed the
warning. So the warning will not be reproduced with 5.10.112 and the
later versions of kernel.

We can remove the irqaffinity, isolcpus, nohz_full, rcu_nocbs, and
kthread_cpus arguments from the kdump kernel's command line arguments,
which will also fix the issue.

Testing:
- An ISO image can be built successfully.
- There are no warnings after the fix with 5.10.74 kernel.

Closes-Bug: 1997932

Signed-off-by: M. Vefa Bicakci <Vefa.Bicakci@windriver.com>
Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
Reported-by: M. Vefa Bicakci <Vefa.Bicakci@windriver.com>
Change-Id: I7d1dbd864fdfe2533197084d7274ef6ab70892db
2022-11-28 19:20:00 -05:00
Li Zhou e1b77cf7f0 kdump-tools: adapt check_secure_boot checking
The kdump-config uses files under /sys/firmware/efi/efivars to detect
secure boot status. But efivars isn't in use because
CONFIG_EFIVAR_FS is not set. We don't want to enable it because
when applying the preempt_rt patch to the Linux kernel,
EFI variables at runtime are disabled by default due to
high latencies
(https://www.spinics.net/lists/linux-rt-users/msg19980.html).

So change to use /sys/kernel/security/lockdown to detect secure
boot status because it is set to 'integrity' in the debian patch
[efi: Lock down the kernel if booted in secure boot mode] which is
in use by us.

Test Plan:
 PASS: Run "sudo kdump-config reload" on target successfully.
 PASS: Can generate vmcore files in /var/log/crash after kernel panic.
 PASS: Above tests are done with both secure boot enabled and disabled.

Story: 2009221
Task: 46644

Signed-off-by: Li Zhou <li.zhou@windriver.com>
Change-Id: I4c305ef49af6da84a7558d1fce6bbb19b8569401
2022-10-25 22:27:02 -04:00
Al Bailey d555f1aae3 Fix bashate failure in zuul
This review allows this repo to pass zuul.

Bashate 2.1.1 was released Oct 6, 2022
It adds a more stict indentation check

Fixed the new bashate error.

Related-Bug: 1991971

Signed-off-by: Al Bailey <al.bailey@windriver.com>
Change-Id: I2730f9216b46b3fa2a83f2f8d55ead2b813f4e37
2022-10-07 17:14:37 +00:00
Joshua Kraitberg 1a64ff8dda Update legacy keystone credential tenant to project
Keystone has standardized the term "project" as the
entity that owns resources, replacing the previous
term "tenant".  Without this change this tool will
not work due to authentication issues.

Test Plan:
Install tools/storage-topology and run it on controller

Closes-Bug: 1987297

Signed-off-by: Joshua Kraitberg <joshua.kraitberg@windriver.com>
Change-Id: I8409ea6233b8eb94fc75158c5dba96c9a71872f9
2022-08-22 10:59:15 -04:00
Jiping Ma c2e79d80b5 Debian: add kdump-tools package.
There is a need to modify the source code of the kdump-tools package to
adapt it to Debian-based StarlingX. This commit replaces the binary
package with a source package.

The default kernel image is located at /boot/vmlinuz-${kernel_version}
in Debian system. But it is /boot/1/vmlinuz-${kernel_version} in the
current starlingx system. In addition, initrd.img is also different
because we use ostree. So this commit creates two soft links for
vmlinuz and initrd.img.

Test Plan:
PASS: Image builds successfully.
PASS: kdump-tools installs successfully.
PASS: Can generate vmcore files in /var/crash after kernel panic.

Story: 2009964
Task: 45623

Depends-On: https://review.opendev.org/c/starlingx/tools/+/845886
Depends-On: https://review.opendev.org/c/starlingx/tools/+/845884

Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
Change-Id: Ifffbf0e436e79d9547a478f8b725e18f283d138e
2022-06-17 12:21:53 -04:00
M. Vefa Bicakci ccf50bd652 Add libbpf v0.5.0
This commit adds libbpf-0.5.0, because recent versions of iproute depend
on it. 0.5.0 is the latest released version as of this writing.

Verification:
- Successfully built in a monolithic build environment.
- In conjunction with I63d557112c653d59b88ac3a4798dee0e89246612, the
  sample eBPF test programs and scripts in the v5.10 kernel's source
  tree were successfully executed.

Partial-Bug: #1949217

Signed-off-by: M. Vefa Bicakci <vefa.bicakci@windriver.com>
Change-Id: I24bb7c60e353643add5e63ae7ea7c6516d07c7bf
2021-10-29 17:23:16 -04:00
M. Vefa Bicakci 7e10236038 Update kexec-tools/makedumpfile to support v5.10 kernel
This patch updates kexec-tools from 2.0.15 to 2.0.21 (and its supporting
software package makedumpfile from 1.6.2 to 1.6.9) for compatibility
with the newer v5.10 kernel.

This commit clones the kexec-tools package's supporting files from
commit 26a7a543427eac59ed39728466f3d95d320f735a in the CentOS RPM
packaging git repository. Links for reference:

- 26a7a54342?branch=c7
- 26a7a54342

Please note that this patch causes the build system to pull in and
extract an SRPM file to acquire:
  kdump-anaconda-addon-003-29-g4c517c5.tar.gz

This is done for security, because the only public reference to commit
4c517c5 is on a Red Hat developer's personal Github account:
  https://github.com/ryncsn/kdump-anaconda-addon/commits/rhel-7

kexec-tools package's supporting files cloned by this commit trigger a
large number of shell script linting errors. Given that the shell
scripts in question are inherited from upstream (i.e., CentOS 7), the
"files" directory of this package is excluded from automated linting via
the changes in tox.ini.

Verification: A kexec-tools RPM package built with this commit was
installed onto an existing StarlingX system. A vmcore file was
succesfully collected from a kernel crash triggered with
/proc/sysrq-trigger. A recent version of the crash utility was found to
succesfully parse the collected vmcore file.

Credits: Thanks to Jiping Ma for helping with cleaning up and publishing
an earlier version of this patch.

Story: 2008921
Task: 43040

Depends-On: https://review.opendev.org/c/starlingx/tools/+/805127

Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
Signed-off-by: M. Vefa Bicakci <vefa.bicakci@windriver.com>
Change-Id: Idc4e523610e4c09259300c8b67ea5e0fbe59c611
2021-10-19 14:29:42 -04:00
Charles Short 277d10417b Fix py3 issues
- Update popen to use universal_newlines=True to enable newlines
  for calls that we parse or consume output for. Without universal_newlines=True,
  the output is treated as bytes under python3
  which leads to issues later where we are using it as
  strings.
- The division operator in Python 3 results in a float, not an integer
  like in Python 2. Use the truncation division operator instead.
- Use python builtins since the behavior of round has changed between
  python2 and python3.
  (https://docs.python.org/3/whatsnew/3.0.html#builtins)

Story: 2006796
Task: 42695

Signed-off-by: Charles Short <charles.short@windriver.com>
Change-Id: I9c9a4fdfd8a65cf6a3034a2c80c3a620ab138d22
(cherry picked from commit 9ced50cf38)
2021-08-16 14:15:42 +00:00
Robert Church ae66f40278 Fix storage topology pylint 2.5.0 error
pylint 2.5.0 was recently introduced with:
- Added a new warning, 'unsupported-assignment-operation', which is
  emitted when item assignment is tried on an object which doesn't have
  this ability. Closes issue #591.

Looking at the implementation of prettytable, this appears to be a false
positive. Disable the check via pragma.

Change-Id: Iebaee525e2af958ca4f877be40768641391c2525
Signed-off-by: Robert Church <robert.church@windriver.com>
2020-04-28 02:06:08 -04:00
Scott Little 3637d66ae4 Relocated some packages to repo 'monitoring'
List of relocated subdirectories:

monitoring/collectd-extensions
monitoring/influxdb-extensions
tools/monitor-tools
tools/vm-topology

Story: 2006166
Task: 35687
Depends-On: I6c62895f8dda5b8dc4ff56680c73c49f3f3d7935
Depends-On: I665dc7fabbfffc798ad57843eb74dca16e7647a3
Change-Id: Iffacd50340005320540cd9ba1495cde0b2231cd0
Signed-off-by: Scott Little <scott.little@windriver.com>
Depends-On: I14e631137ff5658a54d62ad3d7aa2cd0ffaba6e0
2019-09-05 20:31:52 -04:00
Scott Little 062ec89dbb Relocated some packages to repo 'utilities'
List of relocated subdirectories:

ceph/ceph-manager
ceph/python-cephclient
filesystem/nfscheck
logging/logmgmt
security/tpm2-openssl-engine
security/wrs-ssl
tools/collector
tools/engtools/hostdata-collectors
utilities/build-info
utilities/namespace-utils
utilities/pci-irq-affinity-agent
utilities/platform-util
utilities/tis-extensions
utilities/update-motd

Story: 2006166
Task: 35687
Depends-On: I665dc7fabbfffc798ad57843eb74dca16e7647a3
Change-Id: I2bf543a235507a4eff644a7feabd646a99d1474f
Signed-off-by: Scott Little <scott.little@windriver.com>
Depends-On: I85dda6d09028f57c1fb0f96e4bcd73ab9b9550be
Signed-off-by: Scott Little <scott.little@windriver.com>
2019-09-05 20:31:36 -04:00
Eric MacDonald adda44b54e Make platform.conf variables visible to collect.d service scripts
A number of collect.d service scripts are not gathering
all the info that is needed during the collect operation.

Many collect.d service scripts use nodetype, subfunction,
vswitch_type and other platform.conf variables to determine
what to collect.

However, these variables are seen to be empty causing the
service scripts to make incorrect collection decisions.

This update modifies the scoping of loaded platform.conf
variables so that they are visible to all of collect,
including the collect.d service scripts.

Test Plan:

PASS: Verify platform.conf variables are visible to collect.d service scripts.
PASS: Verify file list before and after update.
PASS: Run collect all and verify missing content present.
PASS: Run collect host and verify missing content present.

Change-Id: Ia6f45afd3f3fc676b0d3eaca16dc8bbe68356c8e
Closes-Bug: 1839389
2019-08-13 13:47:23 -04:00
Zuul 9e05349216 Merge "Collapse the glance filesystem into platform" 2019-08-09 18:43:46 +00:00
Kristine Bujold daf33b135d Collapse the glance filesystem into platform
The filesystem /opt/cgcs is removed and its content moved under
/opt/platform.

Resources related to drbd-cgcs and /opt/cgcs are updated to
drbd-plaform and /opt/plaform.

Tested in AIO-SX, AIO-DX and Standard hardware labs.

Depends-On: https://review.opendev.org/674360
Partial-Bug: 1830142

Change-Id: I6d0555f00ab269f7d9567fff365180b66adce8b3
Signed-off-by: Kristine Bujold <kristine.bujold@windriver.com>
2019-08-08 10:54:11 -04:00
Gerry Kopec 86b412adb0 Fix collect script to capture VM console logs
VM console.log files were moved when we cutover to containers config.
Update collect script accordingly.

Change-Id: Ic430588efd90a8c5df41dc7c32724d7bacd88bcd
Partial-Bug: 1835567
Signed-off-by: Gerry Kopec <gerry.kopec@windriver.com>
2019-08-02 01:02:45 -04:00
Eric MacDonald 41e60486af Fix sourcing openrc in collect
The openrc file is being sourced in a short lived
shell rather than in the shell of the sourcing code.

As a result the environment created by the 'source'
does not persist and the inventory request fails
which prevents collect from learning/validating
remote host names.

This update corrects that and makes the code block
involved in learning openrc variables a function
call rather than inline whenever collect_utils
is sourced.

Test Plan:

PASS: Verify collect all with no openrc already sourced
PASS: Verify collect select hosts (same no pre-openrc)
PASS: Verify collect self controller (same no pre-openrc)
PASS: Verify collect of self on compute

Change-Id: I41a097d9d751351f178a1366eb76dfb526c57b19
Closes-Bug: 1837412
Signed-off-by: Eric MacDonald <eric.macdonald@windriver.com>
2019-07-22 16:52:17 -04:00
Saul Wold 92405a9ad7 speclint: only show the diff files
Since we moved the specfile into the tempdir so that it can be modified
the final checks are showing all the specfiles even if they pass the
spec cleaner process.

Also don't reset the failed variable.

Fix the argument check for multiple files

Change-Id: I0a7c33f0ce4f31607bb518a2a899a522cdd7fd4c
Signed-off-by: Saul Wold <sgw@linux.intel.com>
2019-06-27 10:36:24 -07:00
Zuul 6cea1d1e4c Merge "speclint: Add script for linting RPM specfiles" 2019-06-24 16:11:17 +00:00
Saul Wold 39968d9909 speclint: Add script for linting RPM specfiles
This script along with the macros file will be used to initially
check the specfiles being added as part of the MultiOS work. It
will be executed via zuul and tox to scan the openSUSE specfiles,
later we can start add the CentOS specfiles also.

The macros.openstack-singlespec is orignally from
openstack/rpm-packaging customized with tis_patch_ver

Change-Id: I22bf778388e6dcc3ca42d5fd6ec16b30200d6b75
Signed-off-by: Saul Wold <sgw@linux.intel.com>
2019-06-18 19:11:54 -07:00
Saul Wold 83c6575d51 integ: Convert wrsroot -> sysadmin
This also changes the group wrs_protected to sys_protected
to de-brand the user and group names.

Depends-On: I887464a20fc17d66529caea03be2b445156f9426
Change-Id: Ic2ea06d3ac15c31854a604af5f4cecf9094fcaea
Story: 2004716
Task: 28748
Signed-off-by: Saul Wold <sgw@linux.intel.com>
2019-06-14 15:09:09 -07:00
Changcheng Liu 233698ac52 hostdata-collectors: collect mgr-restful-plugin data
In Ceph Mimic version ceph-rest-api is replaced by
ceph-mgr/RESTful plugin.

Story: 2003605
Task: 28860

Depends-On: I302c850191d8ca9548ee12053f803df5abfdd5b4
Change-Id: Ibe104b32f568bb59a02b84c255983323d5d14757
Signed-off-by: Changcheng Liu <changcheng.liu@intel.com>
Signed-off-by: Daniel Badea <daniel.badea@windriver.com>
2019-04-26 08:56:44 +00:00
Eric Barrett cb0b2ffe1e Enable Flake8 Docstring Errors
Flake8 currently ignores the following errors:
H401: docstring should not start with a space
H404: multi line docstring should start without a leading new line
H405: multi line docstring summary not separated with an empty line
Enable them for more consistent formatting of docstrings

Change-Id: I385e28e9c6eca3c02a3def51ff64b00b7a63a853
Story: 2004515
Task: 30076
Signed-off-by: Eric Barrett <eric.barrett@windriver.com>
2019-04-18 11:50:45 -04:00
Al Bailey 32fb0a4e9c Updating script references for openrc
Old location: /etc/nova/openrc
New location: /etc/platform/openrc

The collect script exclude folder is also updated
since /etc/nova and etc/cinder no longer exist on
baremetal.

Story: 2004764
Task: 29907
Change-Id: Iae521fb1d6d394f7ffcf474e7726963215b88bcd
Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
2019-04-08 08:46:11 -05:00
Eric Barrett 27133180fe Enable Flake8 300 Series Errors
Flake8 currently ignores the following errors:
E302: expected 2 blank lines[COMMA] found 1
E303: too many blank lines
E305: expected 2 blank lines after class or function definition, found 1

Change-Id: Idfb00e530967f1a345bc2e263ad77597f83cc5d3
Story: 2004515
Task: 30076
Signed-off-by: Eric Barrett <eric.barrett@windriver.com>
2019-04-03 10:40:01 -04:00
Eric Barrett 7bf3a477f3 Enable Flake8 E12X Errors
Flake8 currently ignores the following Errors:
E121: continuation line under-indented for hanging indent
E123: closing bracket doesn't match indentation of opening bracket
E124: closing bracket doesn't match visual indentation
E125: continuation line with same indent as next logical line
E126: continuation line over-indented for hanging indent
E127: continuation line over-indented for visual indent
E128: continuation line under-indented for visual indent
Enable them for more consistent formatting of code

Change-Id: I415d4824a1f335ba3fceb488b0ae60b9861a036a
Story: 2004515
Task: 30076
Signed-off-by: Eric Barrett <eric.barrett@windriver.com>
2019-04-02 15:11:16 -04:00
Eric Barrett cca0675a03 Enable Flake8 Ambiguous Variable Name Error
Flake8 currently ignores ambiguous variable name error (E741)
Enable it for more thorough testing of code

Change-Id: I752b4a2a380ee086882260981c448bd7217de003
Story: 2004515
Task: 30076
Signed-off-by: Eric Barrett <eric.barrett@windriver.com>
2019-03-27 16:50:26 -04:00
Eric Barrett 11cc2a21bb Enable Flake8 Whitespace Errors
Flake8 currently ignores a number of whitespace related errors:
E201: whitespace after '['
E202: whitespace before '}'
E203: whitespace before ':'
E211: whitespace before '('
E221: multiple spaces before operator
E222: multiple spaces after operator
E225: missing whitespace around operator
E226: missing whitespace around arithmetic operator
E231: missing whitespace after ','
E251: unexpected spaces around keyword / parameter equals
E261: at least two spaces before inline comment
Enable them for more thorough testing of code

Change-Id: Id03f36070b8f16694a12f4d36858680b6e00d530
Story: 2004515
Task: 30076
Signed-off-by: Eric Barrett <eric.barrett@windriver.com>
2019-03-26 15:02:53 -04:00
Eric Barrett 2d0b003e8c Enable Var Assigned to but Unused Flake8 Error
Flake8 currently ignores local variable assigned to but unused error (F841)
Enable F841 for more thorough testing of code

Change-Id: I5a9002dde77773d5e96531e2d4fee3c55264e0fd
Story: 2004515
Task: 30076
Signed-off-by: Eric Barrett <eric.barrett@windriver.com>
2019-03-22 09:30:52 -04:00
Eric Barrett c16a89581c Enable Exception.message Deprecated/Removed Error
Flake8 currently ignores 'BaseException.message' removed in python3
Enable B306 for more thorough testing of code

Change-Id: I9fbb01e8f61d679f4e611324efca6017c3b210e8
Story: 2004515
Task: 30076
Signed-off-by: Eric Barrett <eric.barrett@windriver.com>
2019-03-21 14:51:36 -04:00
Eric Barrett 360ad25564 Enable Comparison to None should use 'is' Error
Flake8 currently ignores comparison to None should be 'if cond is None'
Enable E711 for more thorough testing of code

Change-Id: I608cceff2eeb87c116bccddac26e3c869e5d57df
Story: 2004515
Task: 30076
Signed-off-by: Eric Barrett <eric.barrett@windriver.com>
2019-03-21 10:00:18 -04:00
Zuul 01cfb103bc Merge "Remove Resource Monitor ; aka rmon, from the load" 2019-03-21 01:20:53 +00:00
Eric Barrett 936ca3d5ec Enable Python3 Incompatible Print Flake8 Error
Flake8 currently ignores python3.x incompatible use of print operator
Enable H233 for more thorough testing of code

Change-Id: I77d6bdb4f792a832f04bbf8bd73a9ae3532633ff
Story: 2004515
Task: 30076
Signed-off-by: Eric Barrett <eric.barrett@windriver.com>
2019-03-20 15:28:03 -04:00
Eric Barrett c408ce506e Enable Syntax flake8 Error
Flake8 currently ignores syntax errors
Change python2 style print statements to python3 compatible style
Change in print statements results in new errors discovered by flake8
Fix B006: Do not use mutable data structures for argument defaults error
Fix F821: undefined name 'hashlib' error
Enable syntax errors (E999) for more thorough testing of code

Change-Id: Id8849e4e117ddd1fd50309415466b593d13e7456
Story: 2004515
Task: 30076
Signed-off-by: Eric Barrett <eric.barrett@windriver.com>
2019-03-20 10:19:11 -04:00
Eric Barrett 8d42ceeecb Enable Mixed Spaces and Tabs flake8 Error
Flake8 currently ignores indentation that contains mixed spaces and tabs
Enable it for more thorough testing of code

Story: 2004515
Task: 30076
Change-Id: I268f1c5695bf913daee7497191e6f9546d51e6a0
Signed-off-by: Eric Barrett <eric.barrett@windriver.com>
2019-03-19 09:56:17 -04:00
Eric MacDonald c0617ebb53 Remove Resource Monitor ; aka rmon, from the load
All rmon resource monitoring has been moved to collectd.

This update removes rmon from mtce and the load.

Story: 2002823
Task: 30045

Test Plan:
PASS: Build and install a standard system.
PASS: Inspect mtce rpm list
PASS: Inspect logs
PASS: Check pmon.d

Depends-On: https://review.openstack.org/#/c/643739
Change-Id: I927862895272fdd024d281ab49e0a128465b1b3f
Signed-off-by: Eric MacDonald <eric.macdonald@windriver.com>
2019-03-18 12:27:59 -04:00
Eric MacDonald 81a1a248cb Change collect to use /etc/platform/openrc
The collect tool is failing to source the openrc file
needed to execute system commands to get inventory.

The openrc file has been moved to /etc/platform but
collect expects it to be in /etc/nova.

This update changes collect to source openrc from
/etc/platform in collect_utils and avoids needless
sourcing of that same file multiple times from the
other collect scripts. All collect scripts source
collect_utils.

The update also removes reference to the also recently
removed keyring which is also breaking collect in the
very same way.

Test Plan:
Run collect on individual hosts
Run collect all

Change-Id: I75ff6d3cb8f25a9d0dca182837c7d1b4854896d9
Closes-Bug: 1820421
Signed-off-by: Eric MacDonald <eric.macdonald@windriver.com>
2019-03-17 15:36:15 -04:00
Tao Liu 7c2b6fd05b Integrate Distributed Cloud with containerized services
Remove references to nova and neutron api proxy
Remove the puppet patches that are no longer required

Story: 2004766
Task: 30020

Change-Id: I38daec333dd0a47376be014b4c108d3c92e0b963
Signed-off-by: Tao Liu <tao.liu@windriver.com>
2019-03-14 14:34:26 -04:00
Zuul 5d7ebb734c Merge "change 'compute' to 'worker' in collect utils" 2019-01-10 15:12:24 +00:00
Sun Austin af4879fb68 change 'compute' to 'worker' in collect utils
command 'collect' in worker node will be stuck since
node_type has been changed from 'compute' to 'worker'

Closes-bug: 1810478

Change-Id: I4547bae650b8bb56110eb145e0aca0d49496c793
Signed-off-by: Sun Austin <austin.sun@intel.com>
2019-01-05 09:35:04 +08:00
Sun Austin 79c3a1b255 Fix: "import" issue for Python 2/3 compatible code
use proper absolute path to import modules

remove ignore case 'H301: one import per line'

Story: 2002909
Task:  24886

Change-Id: I1d72e68ead64492ff0c74f8c1bf1b460b573bc1e
Signed-off-by: Sun Austin <austin.sun@intel.com>
2018-12-26 09:19:59 +08:00
Sun Austin 4d9e712c78 Fix: "tuple_params" issue for Python 2/3 compatible code
change "lambda (i, x): i - x" to "lambda i_x: i_x[0] - i_x[1]"
change "def func((tuple))" to "def func(params): (tup_params) = params"

Story: 2002909
Task: 24568

Change-Id: I071be0ab525a580fe6ef201c4f71fa92e8b8b09b
Signed-off-by: Sun Austin <austin.sun@intel.com>
2018-12-26 09:19:59 +08:00
Sun Austin fc9b6f94a8 Fix: "map" issue for Python 2/3 compatible code
Replace map(func, data) with [func(item) for item in data]

Story: 2002909
Task: 24563

Change-Id: I83004eeba036908da483b247093818a6ac3f19c1
Signed-off-by: Sun Austin <austin.sun@intel.com>
2018-12-26 09:19:31 +08:00
Sun Austin 707a12317b Fix: "dict" issue for Python 2/3 compatible code
Replace dict.iteritems() with dict.items()
Replace dict.iterkeys() with dict.keys()
Change dict.keys() to list(dict.keys())

Story: 2002909
Task: 24564

Change-Id: Icf5ef6cc9947a87ee8e013d1225b3f36914e6678
Signed-off-by: Sun Austin <austin.sun@intel.com>
2018-12-25 16:52:30 +08:00
Zuul 204bd9ea0c Merge "Change compute node to worker node personality" 2018-12-14 22:40:53 +00:00
Kwan, Louie 43514ea7fb [Enhancement] Add system active alarms in collect logs
Currently the collect tool does not collect the active alarm list.
i.e. it doesn't contain the output of "fm alarm-list"

Although fm-event.log contains the history of events/alarms,
it is quite time-consuming to vet the fm-event.log for which alarms
were really active at the time of log collection.
A dump of alarm-list to the collect log will
greatly reduce this effort.

Story: 2004478
Tasks: 28193

Change-Id: I663fb055c244b31a84e682481f94bff82f610b90
Signed-off-by: Kwan, Louie <Louie.Kwan@windriver.com>
2018-12-14 12:27:55 -05:00
Tao Liu d4fec24f6c Change compute node to worker node personality
The compute personality & subfunction has been changed to
worker, and compute_reserved.conf has been rename to
worker_reserved.conf. Compute configuration flags have
been updated to worker flags.

This update changes misc dependencies to compute
personality, compute_reserved.conf and configuration
flag files.

It aslo removed puppet-nova dependencies to
compute_reserved.conf.

Tests Performed:
Non-containerized deployment
AIO-SX: Sanity and Nightly automated test suite
AIO-DX: Sanity and Nightly automated test suite
2+2 System: Sanity and Nightly automated test suite
2+2 System: Horizon Patch Orchestration

Kubernetes deployment:
AIO-SX: Create, delete, reboot and rebuild instances
2+2+2 System: worker nodes are unlock enable and no alarms

Story: 2004022
Task: 27013

Depends-On: https://review.openstack.org/#/c/624452/

Change-Id: Iccf5584058a2154f1c4ffdb061938e76b9965861
Signed-off-by: Tao Liu <tao.liu@windriver.com>
2018-12-12 15:09:04 -05:00
Alex Kozyrev cdc60aac81 Barbican integration into logging/patching mechanisms.
- add barbican logs in syslog
- support no reboot patching for barbican processes
- get information about barbican in collect script

Change-Id: I75557a2d35d3861c2dee3d0a5a0960bebc6d0e48
Story: 2003108
Task: 27700
Depends-On: I6b0b0c90456627bebde2b834b339bc968100b6f9
Signed-off-by: Alex Kozyrev <alex.kozyrev@windriver.com>
2018-11-30 13:23:13 -05:00