Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

CORTX-32348: Add log device entries in motr sysconfig file from CDF.yaml #2144

Merged
merged 5 commits into from
Aug 3, 2022

Conversation

d-nayak
Copy link
Contributor

@d-nayak d-nayak commented Jul 29, 2022

Hare configures motr and most of the configuration is provided as an input via
motr confd.xc. Some parameters are passed via a /etc/sysconfig file, e.g.

[@ssc-vm-g4-rhev4-0554:cortx-cc] cat /etc/sysconfig/m0d-0x7200000000000001:0x1
MOTR_M0D_EP='inet:tcp:10.230.240.235@21002'
MOTR_HA_EP='inet:tcp:10.230.240.235@22001'
MOTR_PROCESS_FID='0x7200000000000001:0x1'
MOTR_CONF_XC='/etc/motr/confd.xc'
MOTR_NODE_UUID='b86b7254-11c4-11ed-987d-566fcce40625'

Hare takes the log device from CDF.yaml and the same needs to be added to the
corresponding motr ioservice's /etc/sysconfig file.

Solution:

  • Update cfgen to parse log device from CDF and add to m0conf and
    update-consul-conf (creates the motr sysconfig file)
  • Validate to ensure uniqueness of disks between log/metadata and data sections.

@vaibhavparatwar
Copy link
Contributor

@d-nayak Sanity check is failing, please check.

@vaibhavparatwar
Copy link
Contributor

retest this please

1 similar comment
@pavankrishnat
Copy link
Contributor

retest this please

@d-nayak
Copy link
Contributor Author

d-nayak commented Aug 2, 2022

Thanks to @pavankrishnat, we were able to deploy this code changeset on to 3N setup:
https://eos-jenkins.colo.seagate.com/job/Cortx-Automation/job/RGW/job/setup-cortx-rgw-cluster/10234/console

hostname=ssc-vm-rhev4-2515.colo.seagate.com,user=root,pass=seagate
hostname=ssc-vm-rhev4-2830.colo.seagate.com,user=root,pass=seagate
hostname=ssc-vm-rhev4-2832.colo.seagate.com,user=root,pass=seagate

Results:
Added a log device to cvg-01 by editing solution.yaml:

        log:
          - path: /dev/sdi
            size: 25Gi

Log device details added to cluster.yaml file in data pod :

  • transport_type: libfab
    m0_servers:
    • io_disks:
      log:
      • path: /dev/sdi
        size: 26843545600
        blksize: 4096

Log devices also visible in motr config file:

[root@cortx-data-g0-0 7ba8990a85d38508ca9bac4ff516d3ea]# pwd
/etc/cortx/motr/sysconfig/7ba8990a85d38508ca9bac4ff516d3ea
[root@cortx-data-g0-0 7ba8990a85d38508ca9bac4ff516d3ea]# ls
confd.xc m0d-0x7200000000000001:0x1 m0d-0x7200000000000001:0x2 motr
[root@cortx-data-g0-0 7ba8990a85d38508ca9bac4ff516d3ea]# cat m0d-0x7200000000000001:0x1
MOTR_M0D_EP='inet:tcp:cortx-data-g0-0.cortx-data-headless.cortx.svc.cluster.local@21001'
MOTR_HA_EP='inet:tcp:cortx-data-g0-0.cortx-data-headless.cortx.svc.cluster.local@22001'
MOTR_PROCESS_FID='0x7200000000000001:0x1'
MOTR_BE_SEG_PATH='/dev/sdc'
MOTR_NODE_UUID='7ba8990a85d38508ca9bac4ff516d3ea'
MOTR_LOG_PATH='/dev/sdi'
MOTR_LOG_SIZE='26843545600'

d-nayak added 5 commits August 2, 2022 14:46
Signed-off-by: Deepak Nayak <deepak.nayak@seagate.com>
Signed-off-by: Deepak Nayak <deepak.nayak@seagate.com>
Signed-off-by: Deepak Nayak <deepak.nayak@seagate.com>
Signed-off-by: Deepak Nayak <deepak.nayak@seagate.com>
Signed-off-by: Deepak Nayak <deepak.nayak@seagate.com>
@supriyachavan4398
Copy link
Contributor

Created custom build at https://eos-jenkins.colo.seagate.com/job/GitHub-custom-ci-builds/job/generic/job/custom-ci/7408/ and deployed 6N setup at https://eos-jenkins.colo.seagate.com/job/Cortx-Automation/job/RGW/job/setup-cortx-rgw-cluster/10231/

Tests:
Added log devices to cvg-01 and cvg-02 by editing the solution.yaml:

        - name: cvg-01
          type: ios
          devices:
            metadata:
              - path: /dev/sdc
                size: 25Gi
            data:
              - path: /dev/sdd
                size: 25Gi
            log:
              - path: /dev/sde
                size: 25Gi
        - name: cvg-02
          type: ios
          devices:
            metadata:
              - path: /dev/sdf
                size: 25Gi
            data:
              - path: /dev/sdg
                size: 25Gi
            log:
              - path: /dev/sdh
                size: 25Gi

After redeployment, log devices were added to the generated cluster.yaml file:
For cvg-01:

- transport_type: libfab
  m0_servers:
  - io_disks:
      log:
      - path: /dev/sdh
        size: 26843545600
        blksize: 4096
      data:
      - path: /dev/sdg
        size: 26843545600
        blksize: 4096
      meta_data: /dev/sdf
    runs_confd: false
  - io_disks:
      log: []
      data: []
      meta_data: null
    runs_confd: true
  data_iface: dummy
  hostname: cortx-data-g1-4.cortx-data-headless.cortx.svc.cluster.local

and for cvg-02

- transport_type: libfab
  m0_servers:
  - io_disks:
      log:
      - path: /dev/sde
        size: 26843545600
        blksize: 4096
      data:
      - path: /dev/sdd
        size: 26843545600
        blksize: 4096
      meta_data: /dev/sdc
    runs_confd: false
  - io_disks:
      log: []
      data: []
      meta_data: null
    runs_confd: true
  data_iface: dummy
  hostname: cortx-data-g0-4.cortx-data-headless.cortx.svc.cluster.local

Log devices are also visible in motr config file:

[root@cortx-data-g0-0 7ba8990a85d38508ca9bac4ff516d3ea]# cat m0d-0x7200000000000001:0x1
MOTR_M0D_EP='inet:tcp:cortx-data-g0-0.cortx-data-headless.cortx.svc.cluster.local@21001'
MOTR_HA_EP='inet:tcp:cortx-data-g0-0.cortx-data-headless.cortx.svc.cluster.local@22001'
MOTR_PROCESS_FID='0x7200000000000001:0x1'
MOTR_BE_SEG_PATH='/dev/sdc'
MOTR_NODE_UUID='7ba8990a85d38508ca9bac4ff516d3ea'
MOTR_LOG_PATH='/dev/sde'
MOTR_LOG_SIZE='26843545600'
[root@cortx-data-g1-0 /]# cd /etc/cortx/motr/sysconfig/aa378e768a2ba5291d786b3dc48d5650/
[root@cortx-data-g1-0 aa378e768a2ba5291d786b3dc48d5650]# cat m0d-0x7200000000000001:0x10
MOTR_M0D_EP='inet:tcp:cortx-data-g1-0.cortx-data-headless.cortx.svc.cluster.local@21001'
MOTR_HA_EP='inet:tcp:cortx-data-g1-0.cortx-data-headless.cortx.svc.cluster.local@22001'
MOTR_PROCESS_FID='0x7200000000000001:0x10'
MOTR_BE_SEG_PATH='/dev/sdf'
MOTR_NODE_UUID='aa378e768a2ba5291d786b3dc48d5650'
MOTR_LOG_PATH='/dev/sdh'
MOTR_LOG_SIZE='26843545600'

Checked validation checks to ensure uniqueness of disks between log, metadata and data sections:
If we use similar devices to any of the sections, then it throws assertion errors like:

######################################################
# Deploy CORTX Local Block Storage
######################################################
Error: INSTALLATION FAILED: persistentvolumes "cortx-data-ssc-vm-g3-rhev4-2282-sdd" already exists

cc. @vaibhavparatwar, @d-nayak

@vaibhavparatwar vaibhavparatwar requested review from pavankrishnat and removed request for SwapnilGaonkar7 August 2, 2022 10:45
@mssawant
Copy link

mssawant commented Aug 2, 2022

@d-nayak, can you please reword the commit message, may be squash them into one?

CORTX-32348: pass log device as an input to motr ioservices

Hare configures motr and most of the configuration is provided as an input via
motr `confd.xc`. Some parameters are passed via a `/etc/sysconfig` file, e.g.

[@ssc-vm-g4-rhev4-0554:cortx-cc] cat /etc/sysconfig/m0d-0x7200000000000001\:0x1
MOTR_M0D_EP='inet:tcp:10.230.240.235@21002'
MOTR_HA_EP='inet:tcp:10.230.240.235@22001'
MOTR_PROCESS_FID='0x7200000000000001:0x1'
MOTR_CONF_XC='/etc/motr/confd.xc'
MOTR_NODE_UUID='b86b7254-11c4-11ed-987d-566fcce40625'
[520478@ssc-vm-g4-rhev4-0554:cortx-cc]

Hare takes the log device from CDF.yaml and the same needs to be added to the corresponding
motr ioservice's `/etc/sysconfig` file.

Solution:
- Update cfgen to parse log device from CDF and add to m0conf and
   update-consul-conf (creates the motr sysconfig file)
- Validate to ensure uniqueness of disks between log/metadata and data sections.

few points for commit message,

  1. Commit message needs to describe the problem that we are solving so that reader understands the relevant changes.
  2. Avoid references to time or person (presently, they(motr team), we).
  3. Restrict the contents to 80 columns width.

Copy link

@mssawant mssawant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the commit message as mentioned, no more reviews required.

@d-nayak d-nayak merged commit 150112e into Seagate:main Aug 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants