Bug 1671721 - python3 incompatible expression fails deploy during restart ceph osds daemon(s) - container
Summary: python3 incompatible expression fails deploy during restart ceph osds daemon(...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: Ceph-Ansible
Version: 4.0
Hardware: Unspecified
OS: Unspecified
low
high
Target Milestone: rc
: 4.0
Assignee: John Fulton
QA Contact: Ameena Suhani S H
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-02-01 12:50 UTC by John Fulton
Modified: 2020-01-31 12:46 UTC (History)
9 users (show)

Fixed In Version: ceph-ansible-4.0.0beta1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-01-31 12:45:38 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github ceph ceph-ansible pull 3564 0 None closed Make python print statements python3 compatible 2021-02-10 04:51:14 UTC
Red Hat Product Errata RHBA-2020:0312 0 None None None 2020-01-31 12:46:06 UTC

Description John Fulton 2019-02-01 12:50:25 UTC
When using rhel8 beta and python3 a ceph-ansible deploy fails on the following:

RUNNING HANDLER [ceph-handler : restart ceph osds daemon(s) - container] ******************************************************************************************************************************************
task path: /home/stack/ceph-ansible/roles/ceph-handler/handlers/main.yml:101
Thursday 31 January 2019  19:00:40 +0000 (0:00:00.108)       0:03:43.377 ******
Using module file /usr/lib/python3.6/site-packages/ansible/modules/commands/command.py
<192.168.24.2> ESTABLISH LOCAL CONNECTION FOR USER: stack                                                                                       
<192.168.24.2> EXEC /bin/sh -c 'sudo -H -S -n -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-nzvumdqnlymgjwronbgjmopfmvvthlma; /usr/bin/python3'"'"' && sleep 0'
failed: [rhel8 -> 192.168.24.2] (item=rhel8) => changed=true 
  cmd:                                                                      
  - /usr/bin/env             
  - bash                                                                                                                                        
  - /tmp/restart_osd_daemon.sh     
  delta: '0:21:10.688372'      
  end: '2019-01-31 19:21:51.484987'                                         
  invocation:                
    module_args:                                                                                                                                
      _raw_params: /usr/bin/env bash /tmp/restart_osd_daemon.sh
      _uses_shell: false       
      argv: null                                                            
      chdir: null            
      creates: null                                                                                                                             
      executable: null             
      removes: null            
      stdin: null                                                           
      warn: true             
  item: rhel8                                                                                                                                   
  msg: non-zero return code        
  rc: 1                        
  start: '2019-01-31 19:00:40.796615'                                       
  stderr: |2-  
      File "<string>", line 1  
        import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])  
                                  ^  
    SyntaxError: invalid syntax  
    /tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected  
      File "<string>", line 1  
        import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])  
                                  ^  
    SyntaxError: invalid syntax  
    /tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected  
      File "<string>", line 1  
        import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])  
                                  ^  
    SyntaxError: invalid syntax  
    /tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected  
      File "<string>", line 1  
        import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])  
                                  ^  
    SyntaxError: invalid syntax  
    /tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected  
      File "<string>", line 1  
        import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])  
                                  ^  
    SyntaxError: invalid syntax  
    /tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected  
      File "<string>", line 1  
        import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])  
                                  ^  
    SyntaxError: invalid syntax  
    /tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected  
      File "<string>", line 1  
        import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])  
                                  ^  
    SyntaxError: invalid syntax  
    /tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected  
      File "<string>", line 1  
        import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])  
                                  ^  
    SyntaxError: invalid syntax  
    /tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected  
      File "<string>", line 1  
        import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])  
                                  ^  
    SyntaxError: invalid syntax  
    /tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected  
      File "<string>", line 1  
        import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])  
                                  ^  
    SyntaxError: invalid syntax  
    /tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected  
      File "<string>", line 1  
        import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])  
                                  ^  
    SyntaxError: invalid syntax  
    /tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected  
      File "<string>", line 1  
        import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])  
                                  ^  
    SyntaxError: invalid syntax  
    /tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected  
      File "<string>", line 1  
        import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])  
                                  ^  
    SyntaxError: invalid syntax  
    /tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected  
      File "<string>", line 1  
        import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])  
                                  ^  
    SyntaxError: invalid syntax  
    /tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected  
      File "<string>", line 1  
        import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])  
                                  ^  
    SyntaxError: invalid syntax  
    /tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected  
      File "<string>", line 1  
        import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])  
                                  ^  
    SyntaxError: invalid syntax  
    /tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected  
      File "<string>", line 1  
        import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])  
                                  ^  
    SyntaxError: invalid syntax  
    /tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected  
      File "<string>", line 1  
        import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])  
                                  ^  
    SyntaxError: invalid syntax  
    /tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected  
      File "<string>", line 1  
        import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])  
                                  ^  
    SyntaxError: invalid syntax  
    /tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected  
      File "<string>", line 1  
        import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])  
                                  ^  
    SyntaxError: invalid syntax  
    /tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected  
      File "<string>", line 1  
        import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])  
                                  ^  
    SyntaxError: invalid syntax  
    /tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected  
      File "<string>", line 1  
        import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])  
                                  ^  
    SyntaxError: invalid syntax  
    /tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected  
      File "<string>", line 1  
        import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])  
                                  ^  
    SyntaxError: invalid syntax  
    /tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected  
      File "<string>", line 1
        import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])
                                  ^
    SyntaxError: invalid syntax
    /tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected
      File "<string>", line 1
        import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])
                                  ^
    SyntaxError: invalid syntax
    /tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected
      File "<string>", line 1
        import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])
                                  ^
    SyntaxError: invalid syntax
    /tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected
      File "<string>", line 1
        import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])
                                  ^
    SyntaxError: invalid syntax
    /tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected
      File "<string>", line 1
        import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])
                                  ^
    SyntaxError: invalid syntax
    /tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected
      File "<string>", line 1
        import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])
                                  ^
    SyntaxError: invalid syntax
    /tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected
      File "<string>", line 1
        import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])
                                  ^
    SyntaxError: invalid syntax
    /tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected
      File "<string>", line 1
        import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])
                                  ^
    SyntaxError: invalid syntax
    /tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected
      File "<string>", line 1
        import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])
                                  ^
    SyntaxError: invalid syntax
    /tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected
      File "<string>", line 1
        import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])
                                  ^
    SyntaxError: invalid syntax
    /tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected
      File "<string>", line 1
        import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])
                                  ^
    SyntaxError: invalid syntax
    /tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected
      File "<string>", line 1
...
  - 'SyntaxError: invalid syntax'
  - '/tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected'
  - '  File "<string>", line 1'
  - '    import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])'
  - '                              ^'
  - 'SyntaxError: invalid syntax'
  - '/tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected'
  - '  File "<string>", line 1'
  - '    import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])'
  - '                              ^'
  - 'SyntaxError: invalid syntax'
  - '/tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected'
  - '  File "<string>", line 1'
  - '    import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])'
  - '                              ^'
  - 'SyntaxError: invalid syntax'
  - '/tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected'
  - '  File "<string>", line 1'
  - '    import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])'
  - '                              ^'
  - 'SyntaxError: invalid syntax'
  - '/tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected'
  - '  File "<string>", line 1'
  - '    import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])'
  - '                              ^'
  - 'SyntaxError: invalid syntax'
  - '/tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected'
  - '  File "<string>", line 1'
  - '    import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])'
  - '                              ^'
  - 'SyntaxError: invalid syntax'
  - '/tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected'
  - '  File "<string>", line 1'
  - '    import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])'
  - '                              ^'
  - 'SyntaxError: invalid syntax'
  - '/tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected'
  - '  File "<string>", line 1'
  - '    import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])'
  - '                              ^'
  - 'SyntaxError: invalid syntax'
  - '/tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected'
  - '  File "<string>", line 1'
  - '    import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])'
  - '                              ^'
  - 'SyntaxError: invalid syntax'
  - '/tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected'
  - '  File "<string>", line 1'
  - '    import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])'
  - '                              ^'
  - 'SyntaxError: invalid syntax'
  - '/tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected'
  - '  File "<string>", line 1'
  - '    import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])'
  - '                              ^'
  - 'SyntaxError: invalid syntax'
  - '/tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected'
  - '  File "<string>", line 1'
  - '    import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])'
  - '                              ^'
  - 'SyntaxError: invalid syntax'
  - '/tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected'
  - '  File "<string>", line 1'
  - '    import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])'
  - '                              ^'
  - 'SyntaxError: invalid syntax'
  - '/tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected'
  - '  File "<string>", line 1'
  - '    import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])'
  - '                              ^'
  - 'SyntaxError: invalid syntax'
  - '/tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected'
  - '  File "<string>", line 1'
  - '    import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])'
  - '                              ^'
  - 'SyntaxError: invalid syntax'
  - '/tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected'
  - '  File "<string>", line 1'
  - '    import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])'
  - '                              ^'
  - 'SyntaxError: invalid syntax'
  - '/tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected'
  - '  File "<string>", line 1'
  - '    import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])'
  - '                              ^'
  - 'SyntaxError: invalid syntax'
  - '/tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected'
  - '  File "<string>", line 1'
  - '    import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])'
  - '                              ^'
  - 'SyntaxError: invalid syntax'
  - '/tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected'
  - '  File "<string>", line 1'
  - '    import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])'
  - '                              ^'
  - 'SyntaxError: invalid syntax'
  - '/tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected'
  - '  File "<string>", line 1'
  - '    import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])'
  - '                              ^'
  - 'SyntaxError: invalid syntax'
  - '/tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected'
  - '  File "<string>", line 1'
  - '    import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])'
  - '                              ^'
  - 'SyntaxError: invalid syntax'
  - '/tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected'
  - '  File "<string>", line 1'
  - '    import sys, json; print sum ( [ i["count"] for i in json.load(sys.stdin)["pgmap"]["pgs_by_state"] if "active+clean" in i["state_name"]])'
  - '                              ^'
  - 'SyntaxError: invalid syntax'
  - '/tmp/restart_osd_daemon.sh: line 12: test: : integer expression expected'
  stdout: |-
    Error while running 'ceph --name client.bootstrap-osd --keyring /var/lib/ceph/bootstrap-osd/ceph.keyring --cluster ceph -s', PGs were not reported as active+clean
    It is possible that the cluster has less OSDs than the replica configuration
    Will refuse to continue
      cluster:
        id:     747b1724-24b1-11e9-8b2b-5254000636e1
        health: HEALTH_OK
  
      services:
        mon: 1 daemons, quorum rhel8 (age 21m)
        mgr: rhel8(active, since 21m)
        osd: 1 osds: 1 up (since 21m), 1 in (since 22m)
  
      data:
        pools:   5 pools, 160 pgs
        objects: 0 objects, 0 B
        usage:   1.0 GiB used, 5.0 GiB / 6 GiB avail
        pgs:     160 active+clean
  
    epoch 23
    fsid 747b1724-24b1-11e9-8b2b-5254000636e1
    created 2019-01-31 18:57:28.960919
    modified 2019-01-31 19:00:47.185591
    flags sortbitwise,recovery_deletes,purged_snapdirs,pglog_hardlimit
    crush_version 3
    full_ratio 0.95
    backfillfull_ratio 0.9
    nearfull_ratio 0.85
    require_min_compat_client jewel
    min_compat_client jewel
    require_osd_release nautilus
    pool 1 'volumes' replicated size 1 min_size 1 crush_rule 0 object_hash rjenkins pg_num 32 pgp_num 32 autoscale_mode warn last_change 16 flags hashpspool stripe_width 0 expected_num_objects 1 application rbd
    pool 2 'backups' replicated size 1 min_size 1 crush_rule 0 object_hash rjenkins pg_num 32 pgp_num 32 autoscale_mode warn last_change 17 flags hashpspool stripe_width 0 expected_num_objects 1 application rbd
    pool 3 'vms' replicated size 1 min_size 1 crush_rule 0 object_hash rjenkins pg_num 32 pgp_num 32 autoscale_mode warn last_change 18 flags hashpspool stripe_width 0 expected_num_objects 1 application rbd
    pool 4 'images' replicated size 1 min_size 1 crush_rule 0 object_hash rjenkins pg_num 32 pgp_num 32 autoscale_mode warn last_change 19 flags hashpspool stripe_width 0 expected_num_objects 1 application rbd
    pool 5 'metrics' replicated size 1 min_size 1 crush_rule 0 object_hash rjenkins pg_num 32 pgp_num 32 autoscale_mode warn last_change 20 flags hashpspool stripe_width 0 expected_num_objects 1 application openstack_gnocchi
    max_osd 1
    osd.0 up   in  weight 1 up_from 22 up_thru 22 down_at 21 last_clean_interval [5,20) [v2:192.168.24.2:6802/461917,v1:192.168.24.2:6803/461917] [v2:192.168.24.2:6804/461917,v1:192.168.24.2:6805/461917] exists,up 9e1af5ea-59cf-48cc-ac9d-f8cf5297491d
    ID CLASS WEIGHT  TYPE NAME      STATUS REWEIGHT PRI-AFF
    -1       0.00589 root default
    -3       0.00589     host rhel8
     0   hdd 0.00589         osd.0      up  1.00000 1.00000
    [
        {
            "rule_id": 0,
            "rule_name": "replicated_rule",
            "ruleset": 0,
            "type": 1,
            "min_size": 1,
            "max_size": 10,
            "steps": [
                {
                    "op": "take",
                    "item": -1,
                    "item_name": "default"
                },
                {
                    "op": "chooseleaf_firstn",
                    "num": 0,
                    "type": "host"
                },
                {
                    "op": "emit"
                }
            ]
        }
    ]
  stdout_lines: <omitted>

Comment 1 John Fulton 2019-02-01 12:52:58 UTC
Root cause seems to be here:

 https://github.com/ceph/ceph-ansible/blob/master/roles/ceph-handler/templates/restart_osd_daemon.sh.j2#L12

I reproduced the error using the generated shell command with python3. If I use python2 then the reported syntax error goes away. 

[root@rhel8 ~]# export PYTHON=python3; $(podman exec d9307c880ce8 ceph --name client.bootstrap-osd --keyring /var/lib/ceph/bootstrap-osd/ceph.keyring --cluster ceph -s -f json | $PYTHON -c 'import sys, json; print(json.load(sys.stdin)[pgmap][num_pgs])') -eq $(podman exec d9307c880ce8 ceph --name client.bootstrap-osd --keyring /var/lib/ceph/bootstrap-osd/ceph.keyring --cluster ceph -s -f json | $PYTHON -c 'import sys, json; print sum ( [ i[count] for i in json.load(sys.stdin)[pgmap][pgs_by_state] if active+clean in i[state_name]])')
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'pgmap' is not defined
  File "<string>", line 1
    import sys, json; print sum ( [ i[count] for i in json.load(sys.stdin)[pgmap][pgs_by_state] if active+clean in i[state_name]])
                              ^
SyntaxError: invalid syntax
-bash: -eq: command not found
[root@rhel8 ~]# 


[root@rhel8 ~]# export PYTHON=python2; $(podman exec d9307c880ce8 ceph --name client.bootstrap-osd --keyring /var/lib/ceph/bootstrap-osd/ceph.keyring --cluster ceph -s -f json | $PYTHON -c 'import sys, json; print(json.load(sys.stdin)[pgmap][num_pgs])') -eq $(podman exec d9307c880ce8 ceph --name client.bootstrap-osd --keyring /var/lib/ceph/bootstrap-osd/ceph.keyring --cluster ceph -s -f json | $PYTHON -c 'import sys, json; print sum ( [ i[count] for i in json.load(sys.stdin)[pgmap][pgs_by_state] if active+clean in i[state_name]])')
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'pgmap' is not defined
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'pgmap' is not defined
-bash: -eq: command not found
[root@rhel8 ~]#

Comment 3 Giridhar Ramaraju 2019-08-05 13:10:24 UTC
Updating the QA Contact to a Hemant. Hemant will be rerouting them to the appropriate QE Associate. 

Regards,
Giri

Comment 4 Giridhar Ramaraju 2019-08-05 13:11:28 UTC
Updating the QA Contact to a Hemant. Hemant will be rerouting them to the appropriate QE Associate. 

Regards,
Giri

Comment 9 errata-xmlrpc 2020-01-31 12:45:38 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:0312


Note You need to log in before you can comment on or make changes to this bug.