Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misc: ignore some unusable block devices #745

Merged
merged 1 commit into from Jan 27, 2016

Conversation

robbat2
Copy link
Contributor

@robbat2 robbat2 commented Dec 11, 2015

If a block device is read-only, or is a cloud-init datasource, we should
not change the content on it!

This change detects most documented datasources as of 2015/12/10 from
http://cloudinit.readthedocs.org/en/latest/topics/datasources.html

It cannot detect datasources that are only detectable based on files on
volume (eg config-drive v1)

Signed-off-by: Robin H. Johnson robin.johnson@dreamhost.com

@robbat2
Copy link
Contributor Author

robbat2 commented Dec 11, 2015

@dachary FYI ^^

@ghost
Copy link

ghost commented Dec 11, 2015

@zmc will be pleased if you add unit tests in test_misc.py :-)

@ghost
Copy link

ghost commented Dec 15, 2015

Got the following error while testing (already sent via email but adding here for the record).

2015-12-14T14:37:36.305 INFO:teuthology.orchestra.run.target167114236178:Running: 'sudo blkid -o export -p /dev/vdc'
2015-12-14T14:37:36.731 ERROR:teuthology.contextutil:Saw exception from nested tasks
Traceback (most recent call last):
  File "/home/ubuntu/teuthology/teuthology/contextutil.py", line 28, in nested
    vars.append(enter())
  File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__
    return self.gen.next()
  File "/home/ubuntu/src/ceph-qa-suite_master/tasks/ceph.py", line 357, in cluster
    devs = teuthology.get_scratch_devices(remote)
  File "/home/ubuntu/teuthology/teuthology/misc.py", line 860, in get_scratch_devices
    stderr=StringIO(),
  File "/home/ubuntu/teuthology/teuthology/orchestra/remote.py", line 156, in run
    r = self._runner(client=self.ssh, name=self.shortname, **kwargs)
  File "/home/ubuntu/teuthology/teuthology/orchestra/run.py", line 378, in run
    r.wait()
  File "/home/ubuntu/teuthology/teuthology/orchestra/run.py", line 114, in wait
    label=self.label)
CommandFailedError: Command failed on target167114236178 with status 2: 'sudo blkid -o export -p /dev/vdc'

@robbat2
Copy link
Contributor Author

robbat2 commented Dec 16, 2015

@dachary re-pushed with handling for the errors.

If a block device is read-only, or is a cloud-init datasource, we should
not change the content on it!

This change detects most documented datasources as of 2015/12/10 from
http://cloudinit.readthedocs.org/en/latest/topics/datasources.html

It cannot detect datasources that are only detectable based on files on
volume (eg config-drive v1)

Signed-off-by: Robin H. Johnson <robin.johnson@dreamhost.com>
zmc added a commit that referenced this pull request Jan 27, 2016
misc: ignore some unusable block devices
@zmc zmc merged commit daf3993 into ceph:master Jan 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants