Commit Graph

55 Commits

Author SHA1 Message Date
Zuul 09b80ac7bc Merge "fixing high cpu usage of luks service on compute" 2024-02-06 14:47:44 +00:00
Rahul Roshan Kachchap 90223dda23 Ensure encryption-proider.yaml present in luks
Following checks and enhacement are done in this commit
to handle the patching scenarios:
 - Added check for encryption-proider.yaml to be moved
   to luks volume from /etc/kubernetes directory if not
   present.
 - If encryption-proider.yaml already present in luks
   volume and also exists in /etc/kubernetes directory,
   then delete the encryption-proider.yaml file from
   /etc/kubernetes directory.
 - Remove the encryption-provider.yaml from the
   /opt/platform/config/${sftw_ver}/kubernetes
   if exists.

Test Plan:
PASSED: build-pkgs -c -p luks-fs-mgr
PASSED: build-image
PASSED: AIO-SX patch testing: Verified that the
        encryption-proider.yaml file is present only in
        luks volume. Luks service is up and running.

Story: 2010873
Task: 49533

Change-Id: If0891ed5b93f538953912e22afc940c6e4742800
Signed-off-by: Rahul Roshan Kachchap <rahulroshan.kachchap@windriver.com>
2024-02-06 06:23:48 -05:00
Jagatguru Prasad Mishra da797bbff3 fixing high cpu usage of luks service on compute
Storage and Compute node going in "degraded" state due to high
cpu usage for luks-fs-mgr. Currently the service keeps checking
the luks volume status and exits when it is in inactive state.
This is a redundant activity as the maintenance code already
checks volume status and raises the alarm.

This code change exits the main thread of the service on compute
and storage nodes after unsealing the volume.

Test Plan:
PASS: build-pkgs -c -p luks-fs-mgr
PASS: build-image
PASS: AIO-DX plus: verify if service stops after unsealing luks
      volume on compute and storage nodes and there is no high
      cpu usage alarm.
PASS: AIO-DX plus: verify if luks service continue running
      on controller nodes.

Story: 2010872
Task: 49517

Change-Id: I7cb2cbf6761b429cb06e5b100e0bfdbfce43f94c
Signed-off-by: Jagatguru Prasad Mishra <jagatguruprasad.mishra@windriver.com>
2024-02-04 16:40:25 +00:00
Rahul Roshan Kachchap dd158616be Removing symlink creation on compute/storage host
Luks service creates a symbolic link to encryption-provider.yaml
at /etc/kubernetes from the luks volume. Symlink must be present
only on the controller node only.

This commit adds the code to create the symlink to
encryption-provider.yaml file based on the personality.

Test Plan:
PASSED: build-pkgs -c -p luks-fs-mgr
PASSED: bootstrap
PASSED: symlinks are created at /etc/kubernetes/ for
        controllers only and not for compute/storage

Story: 2010873
Task: 49438

Change-Id: I048e880ef97a17d745f20dd7d247df71cb53eae8
Signed-off-by: Rahul Roshan Kachchap <rahulroshan.kachchap@windriver.com>
2024-01-22 06:03:54 -05:00
Harshad sonde 151539e64b Code enhancements for luks-fs-mgr
Following enhancements and fixes are done in this commit:
- Added code for handling graceful exit of the service.
- Fixed code to remove segfault core-dump.
- Added return value for copyKubeProviderFile() function
  so that service is exited in case of failure.
- Used inotifytools package to detect file change and
  creation recursively.
- Fixed issue related to removal of luks mount path.

Test Plan:
PASSED: Successfully deployed ISO on AIO-DX
PASSED: Both the controllers are up and running
PASSED: No segfault or luks-fs-mgr service crash
        is observed after deployment
PASSED: symlinks are created at /etc/kubernetes/ and
        /opt/platform/config/23.09/kubernetes/ folders.
PASSED: All the files/directories created on the
        /var/luks/stx/luks_fs/controller/ directory
        on active controller are pushed onto the luks volume
        on standby controller.
PASSED: Tested Push functionality from active to standby controller.
        by modifying a file inside a subdirectory on LUKS/controller.
PASSED: Standby controller is able to pull luks/controller
        from the active controller. Verified on the Standard setup
        using HOST-SWACT command.
PASSED: Removed the copy of encryption-provider.yaml file from
        /opt/platform/config/<SW_VERSION>/kubernetes/
        (To support patch installation)
PASSED: LUKS service comes up after unmounting and removal of LUKS
        mount path.

Depends-On: https://review.opendev.org/c/starlingx/tools/+/904556
            https://review.opendev.org/c/starlingx/root/+/904558

Story: 2010873
Task: 49375

Change-Id: I26e7f5c72baf2095bea4df4ef34bec22d0f93aed
Signed-off-by: Harshad sonde <harshad.sonde@windriver.com>
2024-01-12 21:14:31 +05:30
Harshad sonde d602b8ad0e move encryption-provider.yaml to LUKS volume
This code copies '/etc/kubernetes/encryption-provider.yaml'
file to LUKS volume and creates symlink in /etc/kubernetes/
directory. This is required to support the patch-back.

Test Plan:
    PASS: build-pkgs -c -p luks-fs-mgr
    PASS: build-image
    PASS: Steps followed to test
          - Deploy ISO with 22.12
          - Copy the required binaries luks-fs-mgr, .service and
            conf files
          - Rebooted the system
          Result after system reboot
          - luks-fs-mgr.service gets active and running
          - luks-fs-mgr.service creates the luksvolume
          - Creates the necessary dir structure on the luks
            volume /var/luks/stx/luks_fs/controller/etc/kubernetes/
          - encryption-provider.yaml file gets copied in the
            directory
          - Symlink created for the file in
            /etc/kubernetes/encryption-provider.yaml file

Story: 2010873
Task: 49239

Change-Id: Icc141a42397423907edce73db45e60e0608efc7d
Signed-off-by: Harshad sonde <harshad.sonde@windriver.com>
2023-12-19 13:11:40 -05:00
Harshad sonde b82575b03c Pushing luksVol files from active to standby
The luks-fs-mgr service is responsible for setting up of the LUKS
volume. Any files related to application that contain sensitive information and needs to be secured will be copied onto this luks volume.
New functionality added here is, whenever a file is added/modified/deleted from the LUKS volume on the active controller, a fileChangeNotification is triggered which in turn triggers rsync to push these file/s onto the standby controller's LUKS volume.

TEST
PASSED: Deployed changes on Duplex
PASSED: Created new file on active controller
        This triggered IN_CREATE filesystem notification and rsync'd
        to push the new file onto the standby controllers LUKs
        vol.
PASSED: Changed existing file on active controller
        Updated an existing file. This triggered IN_MODIFY notification
        and rsync'd to push the updated/modified file onto the
        standby controller.
PASSED: Deleted a file on active controller
        Delete any file present on the luks volume. This triggered
        IN_DELETE and then further rsync is triggered which deleted
        the same file from the standby controllers
        volume.
        rysnc ensures that the copy of files maintained on both the
        volumes are exactly same.

Story: 2010872
Task: 49058

Change-Id: I12ca851663820c1f407bce791358e447957ceb15
Signed-off-by: Harshad sonde <harshad.sonde@windriver.com>
2023-12-19 00:29:55 -05:00
Jagatguru Prasad Mishra e4e8866a43 Pmon monitoring of luks-fs-mgr service on controllers
luks-fs-mgr service is modified to create a pidfile which can be
tracked using pmon. Pmon passive monitoring on controllers is
enabled by adding a config file which tracks the pidfile and
tries to restart the service if it fails.

Test Plan:
PASS: build-pkgs -c -p luks-fs-mgr
PASS: build-image
PASS: AIO-SX verify if luks.conf is present at /usr/share/starlingx/pmon.d
PASS: pid file luks-fs-mgr.pid should be created at /var/run
PASS: pid file should be deleted after luks-fs-mgr service is stopped.

Story: 2010872
Task: 49249

Change-Id: I97ccb81c2f6fba6b7d0c1fc462d42fbce21595fa
Signed-off-by: Jagatguru Prasad Mishra <jagatguruprasad.mishra@windriver.com>
2023-12-14 13:28:42 +00:00
Rahul Roshan Kachchap aa8a787dfd Enabling Luks service manager as daemon service
Added functionality to run luks-fs-mgr as daemon
service. Included library libdaemon which provides functions and
utilities to daemonize a program.
The daemon function is called to daemonize the program.
The daemon function is provided by libdaemon, and it sets up the
necessary environment for a daemon process. It is called with two
arguments, both set to 0. The first argument is the nochdir
parameter, which tells the function not to change the current
working directory to the root directory ("/").
The second argument is the noclose parameter, which tells the
function not to close standard input, output, and error streams.

Depends on: https://review.opendev.org/c/starlingx/integ/+/898695

Test Plan:
PASSED: build-pkgs -c -p luks-fs-mgr
PASSED: build-image
PASSED: AIO-SX bootstrap
PASSED: binary available at /usr/local/sbin/
PASSED: systemd unit file available at /lib/systemd/system
PASSED: luks_config.json avaiable at /etc/luks-fs-mgr.d/
PASSED: sudo systemctl start luks-fs-mgr
        luks-fs-mgr.service - Create and mount encrypted vault using
                                                                LUKS
        Loaded: loaded (/lib/systemd/system/luks-fs-mgr.service;
                                enabled; vendor preset: enabled)
        Active: active (running) since Fri 2023-10-13 05:58:04 UTC;
                                                       1h 34min ago
        Main PID: 1770 (luks-fs-mgr)
        Tasks: 1 (limit: 28602)
        Memory: 2.1M
        CPU: 3.422s
        CGroup: /system.slice/luks-fs-mgr.service
                └─1770 /usr/local/sbin/luks-fs-mgr start
PASSED: sudo systemctl stop luks-fs-mgr

Story: 2010872
Task: 48944

Change-Id: I975409d749fed8f27b291db80fa10223de60b05c
Signed-off-by: Rahul Roshan Kachchap <rahulroshan.kachchap@windriver.com>
2023-12-01 01:24:29 -05:00
Rahul Roshan Kachchap 8d466e0521 Resizing Luks Volume
Added functionality to resize the luks volume.
Added functionality to write json config file with
the used attributes to create the Luks volume.
luks volume resizing procedure:
 - umount the filesystem
 - increase the size of vault file
 - check the filesystem for errors
 - resize luks volume
 - check the filesystem for errors
 - resize the filesystem
 - re-mount the filesystem

Depends on: https://review.opendev.org/c/starlingx/integ/+/894535

Test Plan:
PASSED: build-pkgs -c -p luks-fs-mgr
PASSED: build-image
PASSED: AIO-SX bootstrap
PASSED: binary available at /usr/local/sbin/
PASSED: systemd unit file available at /lib/systemd/system
PASSED: luks_config.json avaiable at /etc/luks-fs-mgr.d/
PASSED: resizing luks volume on host restart
PASSED: created_luks.json file generated after successful
        luks volume creation
PASSED: resizing luks volume with size <=256M
PASSED: resizing luks volume with size >256M
PASSED: created_luks.json file adjusted with new size
        of luks volume after resizing activity.

Story: 2010872
Task: 48878

Change-Id: I4285bc8da5bf7d9516ba736fd78a85ebf761f835
Signed-off-by: Rahul Roshan Kachchap <rahulroshan.kachchap@windriver.com>
2023-11-28 04:18:51 -05:00
Rahul Roshan Kachchap c6ebac4cd5 Luks encrytion service manager
Added C++ code which is designed for managing encrypted filesystems
for securely managing data on StarlingX. The code gets executed
when the luks-fs-mgr service is started.
The program does the following steps:
 - Generates a passphrase using a PassphraseGenerator.
 - Creates a default directory for LUKS operations if it doesn't exist.
 - Parses the JSON configuration and extracts LUKS volume attributes.
 - Checks if the LUKS vault file exists. If it does, it proceeds
   to open and mount it. If not, it creates the vault file,
   sets up encryption, opens it, creates a filesystem, and mounts it.
 - Logs the relevant information.
 - Cleans up the JSON object.
 - The program returns 0 on successful execution and 1 on failure.

Depends-On: https://review.opendev.org/c/starlingx/integ/+/894531

Test Plan:
PASSED: build-pkgs -c -p luks-fs-mgr
PASSED: build-image
PASSED: AIO-SX bootstrap
PASSED: binary available at /usr/local/sbin/
PASSED: systemd unit file available at /lib/systemd/system
PASSED: luks_config.json avaiable at /etc/luks-fs-mgr.d/
PASSED: Started service on booted host with already created,
        mounted luks volume
PASSED: Started service on booted host with sealed/closed
        luks volume
PASSED: Started service on booted host with unsealed/open luks
        volume and unmounted mountPath but mountPath exists
PASSED: Started service on booted host with unsealed/open luks
        volume and FS is unmounted and vault img file also doesnt
        exists.
PASSED: Started service on booted host  with sealed/closed luks
        volume and mountpath is unmounted and deleted
PASSED: Started service on booted host  with sealed/closed luks
        volume and mountpath is unmounted and deleted but vault
        img file exits
PASSED: Started service on first boot host  with changed config
        file where vault size has 1G space
PASSED: Started service on first boot host  with changed config
        file where vault size has no suffix
PASSED: Started service on first boot host  with changed config
        file where vault size has no suffix as well as the numerical
        value is less than the default size
PASSED: Started service on first boot host  with changed config
        file where vault size has incorrect suffix and numerical
        value is less than the default size
PASSED: Started service on first boot host  with changed config
        file with changed mount path
PASSED: Started service on first boot host  with changed config
        file where vault size has incorrect suffix
PASSED: Started service on booted host  with changed config file
        where mount path has changed to incorrect path
PASSED: Started service on first boot with changed config file
        where MOUNT_PATH is changed to different name under
        default directory
PASSED: Started service on booted host  with changed config file
        where mount path has changed  and volume name is changed
PASSED: Started service on booted host with changed config file
        where we have 2 luks volume with mounted paths and then
        these mounted paths are exchanged with the luks volume
PASSED: Started service on booted host with unsealed/open luks
        volume and FS is unmounted, deleted and vault img file
        also doesnt exists.
PASSED: Started service on first boot with changed config file
        where MOUNT_PATH doesnt contain the full directory path
PASSED: Started service on booted host  with changed config file
        where 2 mount points are associated with 1 luks volume
        and the change is persistent on both the mount points
PASSED: Started service on booted host with missing attribute
        in json config file
PASSED: Started service on booted host with changed config file
        where mount path has changed

Story: 2010872
Task: 48769

Change-Id: I17cb56b91f9c0d956138aa52a2e255f54908acc4
Signed-off-by: Rahul Roshan Kachchap <rahulroshan.kachchap@windriver.com>
2023-10-26 08:39:26 -04:00
Davlet Panech e35b25e6c0 luks-fs-mgr: fix compilation errors
* Add missing includes
* Suppress "unused parameter" warnings because this project is built
  with -Werror

TESTS
============================
* Reproduce the build error
* Apply this fix, rebuild and make sure it compiles w/o issues

Closes-Bug: 2039980
Signed-off-by: Davlet Panech <davlet.panech@windriver.com>
Change-Id: I05bf30845d775e9d754fb61625d2eb13c3712d47
2023-10-20 13:47:31 -04:00
Harshad Sonde 1f15f43355 Generate Passphrase for LUKS service
Implementation of auto-generation of passphrase
Code is extensible to accomodate changes of
SGX, TPM based passphrase generation code in
future.
Current implementaion is done on the basis of HWID.
It is combination of system-uuid +
baseboard-serial-number + chassis-serial-number.

TestPlan:
PASSED: build-pkgs -c -p luks-fs-mgr
PASSED: build-image
PASSED: Installed binary on AIO-SX
PASSED: luks-fs-mr.service is up and running

Story: 2010872
Task: 48770

Change-Id: I1486db23d02fc0dcb3a4439f81ea774cf9032284
Signed-off-by: Harshad Sonde <harshad.sonde@windriver.com>
2023-10-03 08:58:27 -04:00
Rahul Roshan Kachchap f1a536ad8f Introduce Luks encrytion service
Add a luks encryption service which will setup as a systemd service
that manages the creation and configuration of encrypted volume and
runs during the boot process and host unlocking.

This commit covers only the debian packaging framework for
luks-fs-mgr. The code changes below will enable luks-fs-mgr pkg
build and be part of ISO when deployed.

Test Plan:
PASSED: build-pkgs -c -p luks-fs-mgr
PASSED: build-image
PASSED: AIO-SX bootstrap
PASSED: binary available at /usr/local/sbin/
PASSED: systemd unit file available at /lib/systemd/system
PASSED: luks_config.json avaiable at /etc/luks-fs-mgr.d/
PASSED: AIO-SX sudo systemctl status luks-fs-mgr
        luks-fs-mgr.service - Create and mount encrypted vault
        using LUKS
        Loaded: loaded (/lib/systemd/system/luks-fs-mgr.service;
        enabled; vendor preset: enabled)
        Active: inactive (dead) since Tue 2023-08-29 08:18:58 UTC;
        2h 16min ago
        Main PID: 4607 (code=exited, status=0/SUCCESS)
        CPU: 7.063s

Story: 2010872
Task: 48650

Change-Id: I12ca14368eaf466b3148c2de4ce9202a9aa5a19b
Signed-off-by: Rahul Roshan Kachchap <rahulroshan.kachchap@windriver.com>
2023-09-08 01:39:26 -04:00
Manoel Benedito Neto c15e3e1a3a Fix lint errors identified by Zuul pylint job
This commit fixes lint errors identified by Zuul after stx-integ-pylint
job is executed.

Test Plan:
PASS: stx-integ-pylint job is executed successfully.
PASS: Run "yamllint ." command on integ repo base directory. Observe
      that no lint errors of line-length, truthy, indentation,
      new-line-at-end-of-file and document-start are listed.
PASS: build-pkgs -a -c

Closes-Bug: 2011632
Change-Id: I4d8229b5de8c9d88ff2aab6169521ab377b5866c
Signed-off-by: Manoel Benedito Neto <manoel.beneditoneto@windriver.com>
2023-03-15 12:07:17 +00:00
Pedro Vinícius Silva da Cruz 4bc42115a6 Update debian package versions to use git commits
The Debian packaging has been changed to reflect all the
git commits under the directory, and not just the commits
to the metadata folder.

Package builder concatenates the number of revisions added since
the one defined in the BASE_SRCREV to the name of the .deb file
generated. Thus, any new submission to the code in these directories
increment this revision counter in the filename.

Test Plan:
PASS: Created new code submissions to package ceph and verify that
the version in the package name was incremented.
PASS: Created new code submissions to package parted and verify that
the version in the package name was incremented.
PASS: Created new code submissions to package trident-installer and
verify that the version in the package name was incremented.

Story: 2010550
Task: 47490

Signed-by: Pedro Vinícius Silva da Cruz <pedro.silvadacruz@windriver.com>
Change-Id: I16f834fd77f0abafaed39a0d4e6cd78d35fa4b98
2023-03-01 14:30:15 -05:00
Dan Voiculeasa 563811f386 debian: Create /drbd directory
This work affects only Debian. This is part of a fix for a bootstrap
issue.

/drbd directory is currently created during bootstrap by puppet.
Ostree doesn't allow changes to root mountpoint / at runtime.
Create /drbd with correct permissions at package install time.

Tests on AIO-SX:
PASS: build-pkgs, build-image, install
PASS: bootstrap without ostree unlock goes past the issue

Story: 2009964
Task: 45533
Signed-off-by: Dan Voiculeasa <dan.voiculeasa@windriver.com>
Change-Id: Ic22ff6650c7f46b25e1079c237028b5572383a56
2022-06-06 06:27:54 +00:00
Joao Pedro Alexandroni f058d86a96 parted: compile with enable-device-mapper
This is required to support the DM Multipath device.

Test Plan:

PASS: AIO-SX with Ceph, 1 osd
PASS: AIO-SX with Ceph, 2 osd
PASS: AIO-SX with Ceph, 4 osd
PASS: AIO-DX with Ceph, 2 osd
PASS: AIO-DX with Ceph, 4 osd
PASS: Standard + Storage, with Ceph, 4 osd

Story: 2010046
Task: 45428

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Thiago Miranda <ThiagoOliveira.Miranda@windriver.com>
Change-Id: I7a13b2c980025eec0d15e5aa8ddb1d10bf67bd8f
2022-05-24 09:00:37 -03:00
Yue Tao 4a709349a9 meta_data.yaml: add sha256sum checksum
Test Plan:
Pass: Verify sha256sum checksum via "download -s"

Story: 2008846
Task: 44578

Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
Change-Id: I78d9dff2af0afb18c6db4e8d2d39ef79b5cf5864
2022-03-03 14:30:40 +08:00
Dan Voiculeasa e861e7137f Add debian package for drbd-utils
CentOS version was upversioned and is very close to the Debian package.
Copied all patches. 1 needed small adjustment.

Needed to enable lintian overrides for upstream package.
Copied the drbd.service file from CentOS.

Did build drbd-utils. Did build iso.

Story: 2009101
Task: 43496
Signed-off-by: Dan Voiculeasa <dan.voiculeasa@windriver.com>
Change-Id: I44d5b67deb43b2894e7c0213666d54636f39cd40
2021-10-26 11:16:57 +03:00
Takamasa Takenaka 0e7fef247a Add debian package for parted
- Copied 1 patch from CentOS. Another patch is already applied in 3.4.
- Copied the resizepart.sh file from CentOS.
- Suppress to apply debian/patches in debian source package
  because they are already applied.

Test:
- Create debian package for parted
- Create ISO with parted package included

Story: 2009101
Task: 43526

Signed-off-by: Takamasa Takenaka <takamasa.takenaka@windriver.com>
Change-Id: I9a2c0781c07a7e53e7a61800813dc634ed9d5beb
2021-10-22 18:31:51 -03:00
Takamasa Takenaka b24095eccc DRBD upversion from 8.4 to 9.15
- Upversion code tar from 8.4 to 9.15
- Modify drbd.spec to apply code patches
- Porting 8.4 code patches to 9.15
  (Combine several current patches by target file)
Test
- drbd resize operation. Ensure no outstanding alarms
  and drbd-overview indicates insync; and 'sudo lvs'
  indicates resized correctly
- drbd resize operation prior to upgrade and then
  performing the upgrade.
  e.g. drbd may be resized via
       'system controllerfs-modify etcd=<largervalue>',
       when both controllers are
       unlocked-enabled-available

Story: 2009067
Task: 42873

Depends-On: https://review.opendev.org/806736
Signed-off-by: Takamasa Takenaka <takamasa.takenaka@windriver.com>
Change-Id: I25cb46e4b77f90c91d5d7e4dcfa79125776163d1
2021-09-16 14:14:27 -03:00
M. Vefa Bicakci b2c04a8fab drbd: Ensure compatibility with kernel versions >= v5.2
Prior to this commit, the Ansible bootstrap procedure on StarlingX would
fail with drbd-related errors when a v5.10-based kernel was in use. The
error reported by the kernel was "invalid argument".

Upon further debugging, it was discovered that generic-netlink (genl)
messages generated by drbdsetup would be rejected by the v5.10 kernel.
After looking at the git history of the drbd-utils repository, the
following two commits were found:

$ git log -2 --pretty=ref 859151b228d3b3aacefb09d06d515a2589c22e35
859151b228d3 (netlink: Add NLA_F_NESTED flag to nested attribute, 2019-07-12)
92ade5989027 (netlink: prepare for kernel v5.2, 2019-07-12)

This issue appears to be caused by kernel versions >= 5.2 being more
strict with the validation of nested netlink attributes. The patches
required very minor context adjustments and enable the Ansible bootstrap
procedure to succeed.

Story: 2008921
Task: 42787

Change-Id: I573d0caafc741c7668be8ee8e494fde826437a98
Signed-off-by: M. Vefa Bicakci <vefa.bicakci@windriver.com>
2021-07-07 15:30:15 -04:00
David Sullivan e62b1a53b9 Unmount all targets during drbd stop
When stopping drbd, we need to unmount targets from each device.
Devices with multiple mountpoints can fail to unmount, leading to
metadata corruption. Add --all-targets to the umount command.

Closes-Bug: 1920245
Signed-off-by: David Sullivan <david.sullivan@windriver.com>
Change-Id: Ic1b4583c72a0dd256724b8672dbb59126273330b
2021-04-20 17:35:24 -05:00
Zuul 9a7eed14f2 Merge "Add auto-versioning to starlingx/integ packages" 2020-06-30 03:01:38 +00:00
paul 4cad553856 backport drbd main ipv6: Fix interface indices larger than 255
drbd services occasionally fail at rapid successive swact
Netlink device number exceeding 255 (max number
that can be represented with two characters in hex ,
"ff") fail to parse by drbdadm during fast successive swacts,
the Netlink device number (second string in lines of
/proc/net/if_inet6]) gets very large exceeding 255 decimal and
cannot be represented as two hex characters (ff), like this:
fe80000000000000eceeeefffeeeeeee 14e 40 20 80 cali19a19189318

Closes-bug: 1877907

Change-Id: I035eb81830f3c5e5a129c20766348ff842bc05c8
Signed-off-by: Paul Vaduva <Paul.Vaduva@windriver.com>
2020-06-29 23:52:38 +03:00
Dongqi Chen af359d4938 Add auto-versioning to starlingx/integ packages
This update makes use of the PKG_GITREVCOUNT variable
to auto-version the packages in this repo.

Story: 2007750
Task: 39951
Change-Id: I854419c922b9db4edbbf6f1e987a982ec2ec7b59
Signed-off-by: Dongqi Chen <chen.dq@neusoft.com>
2020-06-24 09:48:28 +08:00
Scott Little e80813bb81 Relocated some packages to repo 'config-files'
List of relocated subdirectories:

base/centos-release-config
base/dhcp-config
base/dnsmasq-config
base/haproxy-config
base/initscripts-config
base/lighttpd-config
base/net-snmp-config
base/openssh-config
base/setup-config
base/systemd-config
config-files/audit-config
config-files/docker-config
config-files/io-scheduler
config-files/iptables-config
config-files/memcached-custom
config-files/ntp-config
config-files/pam-config
config-files/rsync-config
config-files/shadow-utils-config
config-files/sudo-config
config-files/syslog-ng-config
config-files/util-linux-config
filesystem/filesystem-scripts
filesystem/iscsi-initiator-utils-config
filesystem/nfs-utils-config
ldap/openldap-config
logging/logrotate-config
networking/mellanox/mlx4-config
networking/openvswitch-config

Story: 2006166
Task: 35687
Depends-On: I665dc7fabbfffc798ad57843eb74dca16e7647a3
Change-Id: I3dc0fc9f88931c5e0963d00274408ff7a16fae3a
Signed-off-by: Scott Little <scott.little@windriver.com>
Depends-On: I761b0f76150881c765b70b2ccd255244c754bd5d
2019-09-05 20:32:09 -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
Erich Cordoba 6bfca507bd Add notices to Intel authored files.
Story: 2005265
Task:  30090

Change-Id: I7cc22cf39d971fbf7fa149b89a892de27b8e6b64
Signed-off-by: Erich Cordoba <erich.cordoba.malibran@intel.com>
2019-03-20 10:31:10 -06:00
Don Penney a01bae238b Check for mount before demoting DRBD filesystem
This update enhances the DRBD OCF script to check whether
a filesystem is mounted before attempting to demote it from
Primary to Secondary. The demotion attempt will result in
DRBD state change failures reported to the console if it
is still in use.

Change-Id: Ie5abe5d0858f75bd0d31ce8d8d1d04e7beb83132
Story: 2004520
Task: 29398
Signed-off-by: Don Penney <don.penney@windriver.com>
2019-02-07 11:20:44 -05:00
zhipengl 920fcb818c Remove last patch of iscsi-initiator-utils
As we see in the patch, it changes %dir to %ghost to avoid RPM audit.
If we move the config file mod change to config package and use RPM
instead of SRPM, we have no audit issue anymore and can ignore related
change.
Deployment test pass and related file check pass!

Story: 2003768
Task: 28459
Depends-on: https://review.openstack.org/#/c/624584/

Change-Id: Ic23ccd740520e1942b3118a84cb03aef5f388332
Signed-off-by: zhipengl <zhipengs.liu@intel.com>
2018-12-12 23:09:56 +08:00
Shuicheng Lin be1e909e1d refactor nfs-utils
Story: 2004404
Task: 28046

since there is no src patch, move the meta patch setting to config
package. And replace srpm with rpm.
The 4 service files(rpc-statd/rpc-statd-notify) from nfs-utils are
kept to avoid rpm audit complain. Just disable them by default.
The service/conf files in files folder are not used, so just remove
them.

Test:
Pass build and multi node deploy test. Confirmed The 4 services are
disabled. Other services are the same as before.

Change-Id: I42d2ef3d61c1f62fe8aaea5467c810fc6e39dc13
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
2018-12-05 20:18:55 +08:00
Martin, Chen 540355adf5 nfs-utils: Remove patches from OpenEmbedded-Core
Test:
1, multi-node deployed with 1 controller and 1 compute enabled
2, duplex deployed wtih 2 controller node enabled

Task: 26447
Story: 2003759

Change-Id: I83ae9a8e2e8a99e6ec5646bb784b85fc58ea33f1
Signed-off-by: Martin, Chen <haochuan.z.chen@intel.com>
2018-11-29 00:53:22 +00:00
Shuicheng Lin 085b941e66 remove unused files in parted package
These files are not listed in build_srpm.data. And are not included
in other place also.

Test:
Pass clean build and multi node deploy test.

Story: 2004406
Task: 28048

Change-Id: Ife1e554bd4897540297b27791885f06b0ad3b9db
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
2018-11-22 23:58:18 +08:00
zhipengl 335a519863 Refactor patches for iscsi-initiator-utils package
Use iscsi-initiator-utils-config package to package config and
service file for iscsi-initiator-utils package.

Deployment test and ping test between WMs pass
Config and service files check pass.

Story: 2003768
Task: 27596

Change-Id: I6512171f1c9186018c0af15b15e7d2094e3d7a73
Signed-off-by: zhipengl <zhipengs.liu@intel.com>
2018-11-18 01:01:24 +00:00
zhipengl 1305fcc31a Remove service config file patch for nfs-utils.
Use nfs-utils-config package to package service and config files for nfs-utils

Story: 2003768
Task: 26461

Change-Id: Id24669ea5f7b7dadff025208e7f7f07f179c1490
Signed-off-by: zhipengl <zhipengs.liu@intel.com>
2018-11-02 01:53:04 +00:00
Tee Ngo d7d8b3cf06 Ensure loading order for nfscommon and mountnfs
In some rare occasions following a host lock/unlock or force
reboot, there are two rpc.statd process one of which is a
runaway that floods daemon.log causing high CPU alarm. Based
on a few samples of startup sequence (success vs failure),
it is evident that the issue appeared each time mountnfs unit
had been loaded before rpc.statd process was started.

This change ensures nfscommon unit, which starts rpc.statd
and rpc.idmapd, is loaded before mountnfs unit.

Tests performed:
  - installation (standard system)
  - sanity (automated, repeats = 10)

Closes-Bug: 1794366
Change-Id: I6a916b9c3348338b0ab79fcec4f2cd5d04741499
Signed-off-by: Tee Ngo <Tee.Ngo@windriver.com>
2018-10-26 14:59:13 -04:00
slin14 05170d50d8 de-fuzz drbd patch
With rpm version < 4.13, patch cmd will create .orig file for fuzzy
patch in default. And this .orig file may lead to rpmbuild failure
"error: Installed (but unpackaged) file(s) found:"

Please visit below link to get more detail info:
https://bugs.launchpad.net/starlingx/+bug/1794611

Story: 2003917
Task: 26962

Change-Id: I9e75bb278e6de63e28b2a1692f03883e5a2e86de
Signed-off-by: slin14 <shuicheng.lin@intel.com>
2018-10-09 23:05:18 +08:00
slin14 0fc7a655c9 de-fuzz nfs-utils patches
When do Centos 7.5 upgraded, some patches didn't resolve and cause
the fuzzy in the line numbers of the patches. And it may cause
.orig file is created when do patch. And this .orig file will lead
to rpm packaging failure due to the unexpected and unpackaged .orig
file.

Please visit below link to get more detail info:
https://bugs.launchpad.net/starlingx/+bug/1794611

Solution:
  Safest solution is to de-fuzz our patches.

Story: 2003389
Task: 26755

Change-Id: I485e28dd3251c908ae1e918a15d3ea33e1ee8475
Signed-off-by: slin14 <shuicheng.lin@intel.com>
2018-09-28 08:06:37 +08:00
slin14 c522cb6310 de-fuzz iscsi-initiator-utils patches
When do Centos 7.5 upgraded, some patches didn't resolve and cause
the fuzzy in the line numbers of the patches. And it may cause
.orig file is created when do patch. And this .orig file will lead
to rpm packaging failure due to the unexpected and unpackaged .orig
file.

Please visit below link to get more detail info:
https://bugs.launchpad.net/starlingx/+bug/1794611

Solution:
  Safest solution is to de-fuzz our patches.

Story: 2003389
Task: 26755

Change-Id: Id45e12fbacccec6c68e7c65994b0dca9955bfcaf
Signed-off-by: slin14 <shuicheng.lin@intel.com>
2018-09-28 07:54:56 +08:00
slin14 b2b11f8a0e de-fuzz parted patches
When do Centos 7.5 upgraded, some patches didn't resolve and cause
the fuzzy in the line numbers of the patches. And it may cause
.orig file is created when do patch. And this .orig file will lead
to rpm packaging failure due to the unexpected and unpackaged .orig
file.

Please visit below link to get more detail info:
https://bugs.launchpad.net/starlingx/+bug/1794611

Solution:
  Safest solution is to de-fuzz our patches.

Story: 2003389
Task: 26755

Change-Id: I3e54f61b200c71c1900fa48d29a43e08c70688d0
Signed-off-by: slin14 <shuicheng.lin@intel.com>
2018-09-28 07:53:33 +08:00
Dean Troyer fe26a0ff84 Merge remote-tracking branch 'origin/master' into f/centos75
Change-Id: I166b99c4ce2ed458ac79ce686064ab05ad3ca198
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2018-09-15 01:18:37 -05:00
Martin Chen dba551a518 Fix linters error and enable linters zuul gate
Fix below linters errors
E010 The "do" should be on same line as for
E010 The "do" should be on same line as while
E011 Then keyword is not on same line as if or elif keyword
E020 Function declaration not in format ^function name {$

Ignore:
E041 Arithmetic expansion using $[ is deprecated for $((
E042 local declaration hides errors
E043 Arithmetic compound has inconsistent return semantics
E044 Use [[ for non-POSIX comparisions

Story: 2003366
Task: 24423

Change-Id: I8b6b72e702d3e89d1813772d6bf16819e28e818c
Signed-off-by: Martin Chen <haochuan.z.chen@intel.com>
2018-09-07 01:50:28 +08:00
Sun Austin 847cf1e92f Fix linters issue E002 and E003 and linters check (none-voting)
E002 Tab indents
E003 Indent not multiple of 4

Story: 2003366
Task: 24424

Change-Id: Ie063ccfe346489f08c4752adaa344f5919db0378
Signed-off-by: Sun Austin <austin.sun@intel.com>
2018-08-31 04:08:52 +00:00
Zuul 8b8b726c81 Merge "upgrade parted to CentOS 7.5 version Most of changes in fix-dev-nodes-getting-removed-for-100-to-300-ms-on-parted-print.patch are already in 7.5 version. So related changes removed." into f/centos75 2018-08-28 01:45:36 +00:00
zhipengl faa1462ca6 upgrade iscsi-initiator-utils to CentOS 7.5 version
Story: 2003389
Task: 24481

Change-Id: I30e310d6708cadfa3ec04032e924def37cdbc735
Signed-off-by: zhipengl <zhipengs.liu@intel.com>
2018-08-27 06:45:52 +00:00
slin14 d60afc72f7 rebase nfs-utils patch to CentOS7.5
Story: 2003389
Task: 24491

Change-Id: Iaae0db17a3ae20f741482372e49c87f85024e574
Signed-off-by: slin14 <shuicheng.lin@intel.com>
2018-08-27 18:35:43 +08:00
slin14 c787890473 rebase e2fsprogs patch to CentOS7.5
src rpm package is dropped to replaced by rpm since no change is needed for e2fsprogs

Story: 2003389
Task: 24490
Depends-On: https://review.openstack.org/#/c/594898/

Change-Id: Ifee5ad90c5b5efb5a98990369a66903120d18a1f
Signed-off-by: slin14 <shuicheng.lin@intel.com>
2018-08-27 17:07:38 +08:00
zhipengl d776a77304 upgrade parted to CentOS 7.5 version
Most of changes in fix-dev-nodes-getting-removed-for-100-to-300-ms-on-parted-print.patch
are already in 7.5 version. So related changes removed.

Story: 2003389
Task: 24479
Depends-On: https://review.openstack.org/#/c/595981/

Change-Id: I92501a66ebb44eab92f4b7377998bb71d70fc722
Signed-off-by: zhipengl <zhipengs.liu@intel.com>
2018-08-25 19:24:50 +08:00