Seagate / cortx-hare

CORTX Hare configures Motr object store, starts/stops Motr services, and notifies Motr of service and device faults.
https://github.com/Seagate/cortx
Apache License 2.0
13 stars 80 forks source link

CORTX-29457: locale warnings generated as part of hctl command #2029

Closed mssawant closed 2 years ago

mssawant commented 2 years ago

In container environment, locale -a command generates following warnings,

[root@cortx-data-headless-svc-ssc-vm-g2-rhev4-1630 /]# locale -a
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_COLLATE to default locale: No such file or directory

Hare hctl interface uses locale -a to find and set appropriate locale, thus the above warnings are generated during hctl command execution.

Solution: Redirect stderr messages generated on locale -a execution to /dev/null.

Signed-off-by: Mandar Sawant mandar.sawant@seagate.com

mssawant commented 2 years ago

With fix in container environment,

[root@cortx-data-headless-svc-ssc-vm-g2-rhev4-1630 /]# hctl status
Byte_count:
    critical_byte_count : 0
    damaged_byte_count : 0
    degraded_byte_count : 0
    healthy_byte_count : 0
Data pool:
    # fid name
    0x6f00000000000001:0x2d3 'storage-set-1__sns'
Profile:
    # fid name: pool(s)
    0x7000000000000001:0x4b5 'Profile_the_pool': 'storage-set-1__sns' 'storage-set-1__dix' None
Services:
    cortx-data-headless-svc-ssc-vm-g3-rhev4-2278  (RC)
    [started]  hax                 0x7200000000000001:0x127        inet:tcp:cortx-data-headless-svc-ssc-vm-g3-rhev4-2278@22001
    [started]  ioservice           0x7200000000000001:0x12a        inet:tcp:cortx-data-headless-svc-ssc-vm-g3-rhev4-2278@21001
    [started]  ioservice           0x7200000000000001:0x137        inet:tcp:cortx-data-headless-svc-ssc-vm-g3-rhev4-2278@21002
    [started]  confd               0x7200000000000001:0x144        inet:tcp:cortx-data-headless-svc-ssc-vm-g3-rhev4-2278@21003
    cortx-data-headless-svc-ssc-vm-g2-rhev4-1631
    [started]  hax                 0x7200000000000001:0x14b        inet:tcp:cortx-data-headless-svc-ssc-vm-g2-rhev4-1631@22001
    [started]  ioservice           0x7200000000000001:0x14e        inet:tcp:cortx-data-headless-svc-ssc-vm-g2-rhev4-1631@21001
    [started]  ioservice           0x7200000000000001:0x15b        inet:tcp:cortx-data-headless-svc-ssc-vm-g2-rhev4-1631@21002
    [started]  confd               0x7200000000000001:0x168        inet:tcp:cortx-data-headless-svc-ssc-vm-g2-rhev4-1631@21003
...
vaibhavparatwar commented 2 years ago

@SwapnilGaonkar7 lets merge it