Skip to content

ceph-volume: api/lvm: check if list of LVs is empty#30101

Merged
alfredodeza merged 1 commit intoceph:masterfrom
rishabh-d-dave:cv-minor
Sep 19, 2019
Merged

ceph-volume: api/lvm: check if list of LVs is empty#30101
alfredodeza merged 1 commit intoceph:masterfrom
rishabh-d-dave:cv-minor

Conversation

@rishabh-d-dave
Copy link
Contributor

@rishabh-d-dave rishabh-d-dave commented Sep 3, 2019

Create the list of logical volumes if the list passed in arguments is
empty and rewrite the condition to make it more readable.

Fixes: https://tracker.ceph.com/issues/41649

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard backend
  • jenkins test docs
  • jenkins render docs

@rishabh-d-dave
Copy link
Contributor Author

Came across the same glitch while working on tracker issue 38175.

@rishabh-d-dave rishabh-d-dave changed the title api/lvm: check if list of LVs is empty ceph-volume: api/lvm: check if list of LVs is empty Sep 3, 2019
Copy link
Contributor

@jan--f jan--f left a comment

Choose a reason for hiding this comment

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

lgtm. Would you mind either creating a tracker ticket and referencing this in you commit or add the backports to luminous, mimic and nautilus yourself. Either way is fine.

Create the list of logical volumes if the list passed in arguments is
empty and rewrite the condition to make it more readable.

Fixes: https://tracker.ceph.com/issues/41649
Signed-off-by: Rishabh Dave <ridave@redhat.com>
@rishabh-d-dave
Copy link
Contributor Author

lgtm. Would you mind either creating a tracker ticket and referencing this in you commit or add the backports to luminous, mimic and nautilus yourself. Either way is fine.

Created and referred the ticket.

@jan--f
Copy link
Contributor

jan--f commented Sep 6, 2019

jenkins test make check

@alfredodeza
Copy link
Contributor

jenkins test ceph-volume tox

@jan--f
Copy link
Contributor

jan--f commented Sep 11, 2019

jenkins test ceph-volume all

@jan--f
Copy link
Contributor

jan--f commented Sep 11, 2019

hmm the Unmodified Submodules is a jenkins error. Can we re-trigger this @alfredodeza?

@rishabh-d-dave
Copy link
Contributor Author

Most failures here too belong either of the following -

Status code was 404 and not [200]: HTTP Error 404: Not Found
fatal: [mon0]: FAILED! => {
    "changed": false, 
    "connection": "close", 
    "content": "404 Not Found\n\nThe resource could not be found.\n\n   ", 
    "content_length": "52", 
    "content_type": "text/plain; charset=UTF-8", 
    "date": "Wed, 11 Sep 2019 08:52:56 GMT", 
    "elapsed": 0, 
    "redirected": false, 
    "server": "nginx", 
    "status": 404, 
    "url": "https://shaman.ceph.com/api/repos/ceph/master/latest/ubuntu/xenial/repo"
}

MSG:

Status code was 404 and not [200]: HTTP Error 404: Not Found
Error: Package: 2:ceph-selinux-15.0.0-4815.g63d3a53.el7.x86_64 (ceph)
           Requires: selinux-policy-base >= 3.13.1-252.el7.1
           Installed: selinux-policy-targeted-3.13.1-229.el7_6.12.noarch (@koji-override-1)
               selinux-policy-base = 3.13.1-229.el7_6.12
           Available: selinux-policy-minimum-3.13.1-229.el7.noarch (base)
               selinux-policy-base = 3.13.1-229.el7
           Available: selinux-policy-minimum-3.13.1-229.el7_6.5.noarch (updates)
               selinux-policy-base = 3.13.1-229.el7_6.5
           Available: selinux-policy-minimum-3.13.1-229.el7_6.6.noarch (updates)
               selinux-policy-base = 3.13.1-229.el7_6.6
           Available: selinux-policy-minimum-3.13.1-229.el7_6.9.noarch (updates)
               selinux-policy-base = 3.13.1-229.el7_6.9
           Available: selinux-policy-minimum-3.13.1-229.el7_6.12.noarch (updates)
               selinux-policy-base = 3.13.1-229.el7_6.12
           Available: selinux-policy-minimum-3.13.1-229.el7_6.15.noarch (updates)
               selinux-policy-base = 3.13.1-229.el7_6.15
           Available: selinux-policy-mls-3.13.1-229.el7.noarch (base)
               selinux-policy-base = 3.13.1-229.el7
           Available: selinux-policy-mls-3.13.1-229.el7_6.5.noarch (updates)
               selinux-policy-base = 3.13.1-229.el7_6.5
           Available: selinux-policy-mls-3.13.1-229.el7_6.6.noarch (updates)
               selinux-policy-base = 3.13.1-229.el7_6.6
           Available: selinux-policy-mls-3.13.1-229.el7_6.9.noarch (updates)
               selinux-policy-base = 3.13.1-229.el7_6.9
           Available: selinux-policy-mls-3.13.1-229.el7_6.12.noarch (updates)
               selinux-policy-base = 3.13.1-229.el7_6.12
           Available: selinux-policy-mls-3.13.1-229.el7_6.15.noarch (updates)
               selinux-policy-base = 3.13.1-229.el7_6.15
           Available: selinux-policy-targeted-3.13.1-229.el7.noarch (base)
               selinux-policy-base = 3.13.1-229.el7
           Available: selinux-policy-targeted-3.13.1-229.el7_6.5.noarch (updates)
               selinux-policy-base = 3.13.1-229.el7_6.5
           Available: selinux-policy-targeted-3.13.1-229.el7_6.6.noarch (updates)
               selinux-policy-base = 3.13.1-229.el7_6.6
           Available: selinux-policy-targeted-3.13.1-229.el7_6.9.noarch (updates)
               selinux-policy-base = 3.13.1-229.el7_6.9
           Available: selinux-policy-targeted-3.13.1-229.el7_6.15.noarch (updates)
               selinux-policy-base = 3.13.1-229.el7_6.15

@rishabh-d-dave
Copy link
Contributor Author

These two jobs[1, 2] report the following error not sure if they are related to this but i'll try investigating them -

STDERR:

Running command: /usr/sbin/vgcreate -s 1G --force --yes ceph-filestore-465a28f7-3f8e-48e5-9bf6-970dcaa90426 /dev/sdb
 stdout: Physical volume "/dev/sdb" successfully created.
 stdout: Volume group "ceph-filestore-465a28f7-3f8e-48e5-9bf6-970dcaa90426" successfully created
Running command: /usr/sbin/vgcreate -s 1G --force --yes ceph-filestore-9754c4b7-9e48-4bc6-be68-009138c08d43 /dev/sdc
 stdout: Physical volume "/dev/sdc" successfully created.
 stdout: Volume group "ceph-filestore-9754c4b7-9e48-4bc6-be68-009138c08d43" successfully created
Traceback (most recent call last):
  File "/sbin/ceph-volume", line 9, in <module>
    load_entry_point('ceph-volume==1.0.0', 'console_scripts', 'ceph-volume')()
  File "/usr/lib/python2.7/site-packages/ceph_volume/main.py", line 38, in __init__
    self.main(self.argv)
  File "/usr/lib/python2.7/site-packages/ceph_volume/decorators.py", line 59, in newfunc
    return f(*a, **kw)
  File "/usr/lib/python2.7/site-packages/ceph_volume/main.py", line 149, in main
    terminal.dispatch(self.mapper, subcommand_args)
  File "/usr/lib/python2.7/site-packages/ceph_volume/terminal.py", line 194, in dispatch
    instance.main()
  File "/usr/lib/python2.7/site-packages/ceph_volume/devices/lvm/main.py", line 40, in main
    terminal.dispatch(self.mapper, self.argv)
  File "/usr/lib/python2.7/site-packages/ceph_volume/terminal.py", line 194, in dispatch
    instance.main()
  File "/usr/lib/python2.7/site-packages/ceph_volume/decorators.py", line 16, in is_root
    return func(*a, **kw)
  File "/usr/lib/python2.7/site-packages/ceph_volume/devices/lvm/batch.py", line 325, in main
    self.execute()
  File "/usr/lib/python2.7/site-packages/ceph_volume/devices/lvm/batch.py", line 288, in execute
    self.strategy.execute()
  File "/usr/lib/python2.7/site-packages/ceph_volume/devices/lvm/strategies/filestore.py", line 146, in execute
    journal_lv_extents = device_vg.sizing(size=self.journal_size.gb.as_int())['extents']
  File "/usr/lib/python2.7/site-packages/ceph_volume/api/lvm.py", line 1106, in sizing
    size = int(self.free / parts)
TypeError: unsupported operand type(s) for /: 'int' and 'NoneType'

[1] https://jenkins.ceph.com/job/ceph-volume-prs-simple-centos7-filestore-dmcrypt_plain/54/consoleFull#-853622487be8fa57d-c354-45fc-9e5c-e33905c76575
[2] https://jenkins.ceph.com/job/ceph-volume-prs-simple-centos7-filestore-activate/53/consoleFull#-853622487be8fa57d-c354-45fc-9e5c-e33905c76575

@jan--f
Copy link
Contributor

jan--f commented Sep 19, 2019

These two jobs[1, 2] report the following error not sure if they are related to this but i'll try investigating them -

This is a known error tracked here https://tracker.ceph.com/issues/41293

I'm working on solving this in a larger refactor.

@rishabh-d-dave
Copy link
Contributor Author

These two jobs[1, 2] report the following error not sure if they are related to this but i'll try investigating them -

This is a known error tracked here https://tracker.ceph.com/issues/41293

I'm working on solving this in a larger refactor.

Ok. Thank you for letting me know. :)

@rishabh-d-dave
Copy link
Contributor Author

jenkins test ceph-volume all

@rishabh-d-dave
Copy link
Contributor Author

rishabh-d-dave commented Sep 19, 2019

@alfredodeza @jan--f @andrewschoen
Please review this PR too. The jobs that have valid failure is not related to this PR and Jan is working on them.

Copy link
Contributor

@alfredodeza alfredodeza left a comment

Choose a reason for hiding this comment

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

The failures from Xenial are expected because 'test ceph-volume all' includes them but they can't be run against master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants