diff --git a/confluent_osdeploy/el7-diskless/profiles/default/scripts/getinstalldisk b/confluent_osdeploy/el7-diskless/profiles/default/scripts/getinstalldisk index 04c7708e..c954a254 100644 --- a/confluent_osdeploy/el7-diskless/profiles/default/scripts/getinstalldisk +++ b/confluent_osdeploy/el7-diskless/profiles/default/scripts/getinstalldisk @@ -1,3 +1,4 @@ +#!/usr/bin/python3 import subprocess import os @@ -10,8 +11,9 @@ class DiskInfo(object): self.path = None self.model = '' self.size = 0 - self.driver = None + self.driver = '' self.mdcontainer = '' + self.subsystype = '' devnode = '/dev/{0}'.format(devname) qprop = subprocess.check_output( ['udevadm', 'info', '--query=property', devnode]) @@ -46,7 +48,9 @@ class DiskInfo(object): elif (k == 'DRIVERS' and not self.driver and v not in ('"sd"', '""')): self.driver = v.replace('"', '') - if not self.driver and 'imsm' not in self.mdcontainer: + elif k == 'ATTRS{subsystype}': + self.subsystype = v.replace('"', '') + if not self.driver and 'imsm' not in self.mdcontainer and self.subsystype != 'nvm': raise Exception("No driver detected") if os.path.exists('/sys/block/{0}/size'.format(self.name)): with open('/sys/block/{0}/size'.format(self.name), 'r') as sizesrc: diff --git a/confluent_osdeploy/el7/profiles/default/scripts/getinstalldisk b/confluent_osdeploy/el7/profiles/default/scripts/getinstalldisk index 04c7708e..c954a254 100644 --- a/confluent_osdeploy/el7/profiles/default/scripts/getinstalldisk +++ b/confluent_osdeploy/el7/profiles/default/scripts/getinstalldisk @@ -1,3 +1,4 @@ +#!/usr/bin/python3 import subprocess import os @@ -10,8 +11,9 @@ class DiskInfo(object): self.path = None self.model = '' self.size = 0 - self.driver = None + self.driver = '' self.mdcontainer = '' + self.subsystype = '' devnode = '/dev/{0}'.format(devname) qprop = subprocess.check_output( ['udevadm', 'info', '--query=property', devnode]) @@ -46,7 +48,9 @@ class DiskInfo(object): elif (k == 'DRIVERS' and not self.driver and v not in ('"sd"', '""')): self.driver = v.replace('"', '') - if not self.driver and 'imsm' not in self.mdcontainer: + elif k == 'ATTRS{subsystype}': + self.subsystype = v.replace('"', '') + if not self.driver and 'imsm' not in self.mdcontainer and self.subsystype != 'nvm': raise Exception("No driver detected") if os.path.exists('/sys/block/{0}/size'.format(self.name)): with open('/sys/block/{0}/size'.format(self.name), 'r') as sizesrc: diff --git a/confluent_osdeploy/el8-diskless/profiles/default/scripts/getinstalldisk b/confluent_osdeploy/el8-diskless/profiles/default/scripts/getinstalldisk index 04c7708e..c954a254 100644 --- a/confluent_osdeploy/el8-diskless/profiles/default/scripts/getinstalldisk +++ b/confluent_osdeploy/el8-diskless/profiles/default/scripts/getinstalldisk @@ -1,3 +1,4 @@ +#!/usr/bin/python3 import subprocess import os @@ -10,8 +11,9 @@ class DiskInfo(object): self.path = None self.model = '' self.size = 0 - self.driver = None + self.driver = '' self.mdcontainer = '' + self.subsystype = '' devnode = '/dev/{0}'.format(devname) qprop = subprocess.check_output( ['udevadm', 'info', '--query=property', devnode]) @@ -46,7 +48,9 @@ class DiskInfo(object): elif (k == 'DRIVERS' and not self.driver and v not in ('"sd"', '""')): self.driver = v.replace('"', '') - if not self.driver and 'imsm' not in self.mdcontainer: + elif k == 'ATTRS{subsystype}': + self.subsystype = v.replace('"', '') + if not self.driver and 'imsm' not in self.mdcontainer and self.subsystype != 'nvm': raise Exception("No driver detected") if os.path.exists('/sys/block/{0}/size'.format(self.name)): with open('/sys/block/{0}/size'.format(self.name), 'r') as sizesrc: diff --git a/confluent_osdeploy/el8/profiles/default/scripts/getinstalldisk b/confluent_osdeploy/el8/profiles/default/scripts/getinstalldisk index 04c7708e..c954a254 100644 --- a/confluent_osdeploy/el8/profiles/default/scripts/getinstalldisk +++ b/confluent_osdeploy/el8/profiles/default/scripts/getinstalldisk @@ -1,3 +1,4 @@ +#!/usr/bin/python3 import subprocess import os @@ -10,8 +11,9 @@ class DiskInfo(object): self.path = None self.model = '' self.size = 0 - self.driver = None + self.driver = '' self.mdcontainer = '' + self.subsystype = '' devnode = '/dev/{0}'.format(devname) qprop = subprocess.check_output( ['udevadm', 'info', '--query=property', devnode]) @@ -46,7 +48,9 @@ class DiskInfo(object): elif (k == 'DRIVERS' and not self.driver and v not in ('"sd"', '""')): self.driver = v.replace('"', '') - if not self.driver and 'imsm' not in self.mdcontainer: + elif k == 'ATTRS{subsystype}': + self.subsystype = v.replace('"', '') + if not self.driver and 'imsm' not in self.mdcontainer and self.subsystype != 'nvm': raise Exception("No driver detected") if os.path.exists('/sys/block/{0}/size'.format(self.name)): with open('/sys/block/{0}/size'.format(self.name), 'r') as sizesrc: diff --git a/confluent_osdeploy/el9-diskless/profiles/default/scripts/getinstalldisk b/confluent_osdeploy/el9-diskless/profiles/default/scripts/getinstalldisk index 04c7708e..c954a254 100644 --- a/confluent_osdeploy/el9-diskless/profiles/default/scripts/getinstalldisk +++ b/confluent_osdeploy/el9-diskless/profiles/default/scripts/getinstalldisk @@ -1,3 +1,4 @@ +#!/usr/bin/python3 import subprocess import os @@ -10,8 +11,9 @@ class DiskInfo(object): self.path = None self.model = '' self.size = 0 - self.driver = None + self.driver = '' self.mdcontainer = '' + self.subsystype = '' devnode = '/dev/{0}'.format(devname) qprop = subprocess.check_output( ['udevadm', 'info', '--query=property', devnode]) @@ -46,7 +48,9 @@ class DiskInfo(object): elif (k == 'DRIVERS' and not self.driver and v not in ('"sd"', '""')): self.driver = v.replace('"', '') - if not self.driver and 'imsm' not in self.mdcontainer: + elif k == 'ATTRS{subsystype}': + self.subsystype = v.replace('"', '') + if not self.driver and 'imsm' not in self.mdcontainer and self.subsystype != 'nvm': raise Exception("No driver detected") if os.path.exists('/sys/block/{0}/size'.format(self.name)): with open('/sys/block/{0}/size'.format(self.name), 'r') as sizesrc: diff --git a/confluent_osdeploy/rhvh4/profiles/default/scripts/getinstalldisk b/confluent_osdeploy/rhvh4/profiles/default/scripts/getinstalldisk index 04c7708e..c954a254 100644 --- a/confluent_osdeploy/rhvh4/profiles/default/scripts/getinstalldisk +++ b/confluent_osdeploy/rhvh4/profiles/default/scripts/getinstalldisk @@ -1,3 +1,4 @@ +#!/usr/bin/python3 import subprocess import os @@ -10,8 +11,9 @@ class DiskInfo(object): self.path = None self.model = '' self.size = 0 - self.driver = None + self.driver = '' self.mdcontainer = '' + self.subsystype = '' devnode = '/dev/{0}'.format(devname) qprop = subprocess.check_output( ['udevadm', 'info', '--query=property', devnode]) @@ -46,7 +48,9 @@ class DiskInfo(object): elif (k == 'DRIVERS' and not self.driver and v not in ('"sd"', '""')): self.driver = v.replace('"', '') - if not self.driver and 'imsm' not in self.mdcontainer: + elif k == 'ATTRS{subsystype}': + self.subsystype = v.replace('"', '') + if not self.driver and 'imsm' not in self.mdcontainer and self.subsystype != 'nvm': raise Exception("No driver detected") if os.path.exists('/sys/block/{0}/size'.format(self.name)): with open('/sys/block/{0}/size'.format(self.name), 'r') as sizesrc: diff --git a/confluent_osdeploy/suse15/profiles/hpc/scripts/getinstalldisk b/confluent_osdeploy/suse15/profiles/hpc/scripts/getinstalldisk index 04c7708e..c954a254 100644 --- a/confluent_osdeploy/suse15/profiles/hpc/scripts/getinstalldisk +++ b/confluent_osdeploy/suse15/profiles/hpc/scripts/getinstalldisk @@ -1,3 +1,4 @@ +#!/usr/bin/python3 import subprocess import os @@ -10,8 +11,9 @@ class DiskInfo(object): self.path = None self.model = '' self.size = 0 - self.driver = None + self.driver = '' self.mdcontainer = '' + self.subsystype = '' devnode = '/dev/{0}'.format(devname) qprop = subprocess.check_output( ['udevadm', 'info', '--query=property', devnode]) @@ -46,7 +48,9 @@ class DiskInfo(object): elif (k == 'DRIVERS' and not self.driver and v not in ('"sd"', '""')): self.driver = v.replace('"', '') - if not self.driver and 'imsm' not in self.mdcontainer: + elif k == 'ATTRS{subsystype}': + self.subsystype = v.replace('"', '') + if not self.driver and 'imsm' not in self.mdcontainer and self.subsystype != 'nvm': raise Exception("No driver detected") if os.path.exists('/sys/block/{0}/size'.format(self.name)): with open('/sys/block/{0}/size'.format(self.name), 'r') as sizesrc: diff --git a/confluent_osdeploy/suse15/profiles/server/scripts/getinstalldisk b/confluent_osdeploy/suse15/profiles/server/scripts/getinstalldisk index 04c7708e..c954a254 100644 --- a/confluent_osdeploy/suse15/profiles/server/scripts/getinstalldisk +++ b/confluent_osdeploy/suse15/profiles/server/scripts/getinstalldisk @@ -1,3 +1,4 @@ +#!/usr/bin/python3 import subprocess import os @@ -10,8 +11,9 @@ class DiskInfo(object): self.path = None self.model = '' self.size = 0 - self.driver = None + self.driver = '' self.mdcontainer = '' + self.subsystype = '' devnode = '/dev/{0}'.format(devname) qprop = subprocess.check_output( ['udevadm', 'info', '--query=property', devnode]) @@ -46,7 +48,9 @@ class DiskInfo(object): elif (k == 'DRIVERS' and not self.driver and v not in ('"sd"', '""')): self.driver = v.replace('"', '') - if not self.driver and 'imsm' not in self.mdcontainer: + elif k == 'ATTRS{subsystype}': + self.subsystype = v.replace('"', '') + if not self.driver and 'imsm' not in self.mdcontainer and self.subsystype != 'nvm': raise Exception("No driver detected") if os.path.exists('/sys/block/{0}/size'.format(self.name)): with open('/sys/block/{0}/size'.format(self.name), 'r') as sizesrc: diff --git a/confluent_osdeploy/ubuntu20.04-diskless/profiles/default/scripts/getinstalldisk b/confluent_osdeploy/ubuntu20.04-diskless/profiles/default/scripts/getinstalldisk index 04c7708e..c954a254 100644 --- a/confluent_osdeploy/ubuntu20.04-diskless/profiles/default/scripts/getinstalldisk +++ b/confluent_osdeploy/ubuntu20.04-diskless/profiles/default/scripts/getinstalldisk @@ -1,3 +1,4 @@ +#!/usr/bin/python3 import subprocess import os @@ -10,8 +11,9 @@ class DiskInfo(object): self.path = None self.model = '' self.size = 0 - self.driver = None + self.driver = '' self.mdcontainer = '' + self.subsystype = '' devnode = '/dev/{0}'.format(devname) qprop = subprocess.check_output( ['udevadm', 'info', '--query=property', devnode]) @@ -46,7 +48,9 @@ class DiskInfo(object): elif (k == 'DRIVERS' and not self.driver and v not in ('"sd"', '""')): self.driver = v.replace('"', '') - if not self.driver and 'imsm' not in self.mdcontainer: + elif k == 'ATTRS{subsystype}': + self.subsystype = v.replace('"', '') + if not self.driver and 'imsm' not in self.mdcontainer and self.subsystype != 'nvm': raise Exception("No driver detected") if os.path.exists('/sys/block/{0}/size'.format(self.name)): with open('/sys/block/{0}/size'.format(self.name), 'r') as sizesrc: diff --git a/confluent_osdeploy/ubuntu20.04/profiles/default/scripts/getinstalldisk b/confluent_osdeploy/ubuntu20.04/profiles/default/scripts/getinstalldisk index 04c7708e..c954a254 100644 --- a/confluent_osdeploy/ubuntu20.04/profiles/default/scripts/getinstalldisk +++ b/confluent_osdeploy/ubuntu20.04/profiles/default/scripts/getinstalldisk @@ -1,3 +1,4 @@ +#!/usr/bin/python3 import subprocess import os @@ -10,8 +11,9 @@ class DiskInfo(object): self.path = None self.model = '' self.size = 0 - self.driver = None + self.driver = '' self.mdcontainer = '' + self.subsystype = '' devnode = '/dev/{0}'.format(devname) qprop = subprocess.check_output( ['udevadm', 'info', '--query=property', devnode]) @@ -46,7 +48,9 @@ class DiskInfo(object): elif (k == 'DRIVERS' and not self.driver and v not in ('"sd"', '""')): self.driver = v.replace('"', '') - if not self.driver and 'imsm' not in self.mdcontainer: + elif k == 'ATTRS{subsystype}': + self.subsystype = v.replace('"', '') + if not self.driver and 'imsm' not in self.mdcontainer and self.subsystype != 'nvm': raise Exception("No driver detected") if os.path.exists('/sys/block/{0}/size'.format(self.name)): with open('/sys/block/{0}/size'.format(self.name), 'r') as sizesrc: diff --git a/confluent_osdeploy/ubuntu22.04/profiles/default/scripts/getinstalldisk b/confluent_osdeploy/ubuntu22.04/profiles/default/scripts/getinstalldisk index 04c7708e..c954a254 100644 --- a/confluent_osdeploy/ubuntu22.04/profiles/default/scripts/getinstalldisk +++ b/confluent_osdeploy/ubuntu22.04/profiles/default/scripts/getinstalldisk @@ -1,3 +1,4 @@ +#!/usr/bin/python3 import subprocess import os @@ -10,8 +11,9 @@ class DiskInfo(object): self.path = None self.model = '' self.size = 0 - self.driver = None + self.driver = '' self.mdcontainer = '' + self.subsystype = '' devnode = '/dev/{0}'.format(devname) qprop = subprocess.check_output( ['udevadm', 'info', '--query=property', devnode]) @@ -46,7 +48,9 @@ class DiskInfo(object): elif (k == 'DRIVERS' and not self.driver and v not in ('"sd"', '""')): self.driver = v.replace('"', '') - if not self.driver and 'imsm' not in self.mdcontainer: + elif k == 'ATTRS{subsystype}': + self.subsystype = v.replace('"', '') + if not self.driver and 'imsm' not in self.mdcontainer and self.subsystype != 'nvm': raise Exception("No driver detected") if os.path.exists('/sys/block/{0}/size'.format(self.name)): with open('/sys/block/{0}/size'.format(self.name), 'r') as sizesrc: