summaryrefslogtreecommitdiff
path: root/cinder/privsep
diff options
context:
space:
mode:
authorChuck Short <chucks@redhat.com>2018-09-18 11:35:26 -0400
committerChuck Short <chucks@redhat.com>2018-09-18 11:36:08 -0400
commitdd5f136442d7b9bf9a829f72e5680aa67ab76f5a (patch)
tree3cfe5c76f3f0522a602a890ab06f4f067ca9f39f /cinder/privsep
parentab911c1b4772e9a720e034035d669ce9530d8cbe (diff)
downloadcinder-dd5f136442d7b9bf9a829f72e5680aa67ab76f5a.tar.gz
Remove udevadm from rootwrap
Use oslo.privsep for udevadm Change-Id: Ib89354c9555c4b2c9f5a8331a788d7fe4ac46694 Signed-off-by: Chuck Short <chucks@redhat.com>
Diffstat (limited to 'cinder/privsep')
-rw-r--r--cinder/privsep/lvm.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/cinder/privsep/lvm.py b/cinder/privsep/lvm.py
new file mode 100644
index 000000000..a460520db
--- /dev/null
+++ b/cinder/privsep/lvm.py
@@ -0,0 +1,26 @@
+# Copyright 2018 Red Hat, Inc
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+"""
+Helpers for lvm related routines
+"""
+
+from oslo_concurrency import processutils
+
+import cinder.privsep
+
+
+@cinder.privsep.sys_admin_pctxt.entrypoint
+def udevadm_settle():
+ processutils.execute('udevadm', 'settle')