Skip to content

Commit 6b4adbb

Browse files
Preview-Experimental Support EL10 as Management Server and KVM host (#10496)
* cloudstack: add support for EL10 This adds support for Fedora 40 and (upcoming) EL10 distro to be used as mgmt/usage server, mysql/nfs & KVM host. Python3 version has changed to 3.12.9 which isn't automatically determining the python-path. * python: WIP code, this fails right now Need to discuss/check if we can skip this code. Where/how is cgroup setup used with KVM agent. * prep cloudutils to be EL10 ready Fixes issue for Fedora, it was running old EL6 hooks which isn't applicable for modern Fedora version that are closer to EL8/9/10
1 parent 16b7b71 commit 6b4adbb

File tree

5 files changed

+48
-3
lines changed

5 files changed

+48
-3
lines changed

agent/bindir/cloud-setup-agent.in

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,19 @@ import os
2020
import logging
2121
import sys
2222
import socket
23+
24+
# ---- This snippet of code adds the sources path and the waf configured PYTHONDIR to the Python path ----
25+
# ---- We do this so cloud_utils can be looked up in the following order:
26+
# ---- 1) Sources directory
27+
# ---- 2) waf configured PYTHONDIR
28+
# ---- 3) System Python path
29+
for pythonpath in (
30+
"@PYTHONDIR@",
31+
os.path.join(os.path.dirname(__file__),os.path.pardir,os.path.pardir,"python","lib"),
32+
):
33+
if os.path.isdir(pythonpath): sys.path.insert(0,pythonpath)
34+
# ---- End snippet of code ----
35+
2336
from cloudutils.cloudException import CloudRuntimeException, CloudInternalException
2437
from cloudutils.utilities import initLoging, bash
2538
from cloudutils.configFileOps import configFileOps

agent/bindir/libvirtqemuhook.in

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,19 @@ import sys
2020
import os
2121
import subprocess
2222
from threading import Timer
23+
24+
# ---- This snippet of code adds the sources path and the waf configured PYTHONDIR to the Python path ----
25+
# ---- We do this so cloud_utils can be looked up in the following order:
26+
# ---- 1) Sources directory
27+
# ---- 2) waf configured PYTHONDIR
28+
# ---- 3) System Python path
29+
for pythonpath in (
30+
"@PYTHONDIR@",
31+
os.path.join(os.path.dirname(__file__),os.path.pardir,os.path.pardir,"python","lib"),
32+
):
33+
if os.path.isdir(pythonpath): sys.path.insert(0,pythonpath)
34+
# ---- End snippet of code ----
35+
2336
from xml.dom.minidom import parse
2437
from cloudutils.configFileOps import configFileOps
2538
from cloudutils.networkConfig import networkConfig

client/bindir/cloud-setup-management.in

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,27 @@
1616
# specific language governing permissions and limitations
1717
# under the License.
1818

19+
import os
1920
import sys
21+
# ---- This snippet of code adds the sources path and the waf configured PYTHONDIR to the Python path ----
22+
# ---- We do this so cloud_utils can be looked up in the following order:
23+
# ---- 1) Sources directory
24+
# ---- 2) waf configured PYTHONDIR
25+
# ---- 3) System Python path
26+
for pythonpath in (
27+
"@PYTHONDIR@",
28+
os.path.join(os.path.dirname(__file__),os.path.pardir,os.path.pardir,"python","lib"),
29+
):
30+
if os.path.isdir(pythonpath): sys.path.insert(0,pythonpath)
31+
# ---- End snippet of code ----
32+
2033
from cloudutils.syscfg import sysConfigFactory
2134
from cloudutils.utilities import initLoging, UnknownSystemException
2235
from cloudutils.cloudException import CloudRuntimeException, CloudInternalException
2336
from cloudutils.globalEnv import globalEnv
2437
from cloudutils.serviceConfigServer import cloudManagementConfig
2538
from optparse import OptionParser
39+
2640
if __name__ == '__main__':
2741
initLoging("@MSLOGDIR@/setupManagement.log")
2842
glbEnv = globalEnv()

python/lib/cloudutils/syscfg.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ def getAgent(glbEnv):
3939
return sysConfigAgentUbuntu(glbEnv)
4040
elif distribution == "CentOS" or distribution == "RHEL5":
4141
return sysConfigEL5(glbEnv)
42-
elif distribution == "Fedora" or distribution == "RHEL6":
42+
elif distribution == "RHEL6":
4343
return sysConfigEL6(glbEnv)
4444
elif distribution == "RHEL7":
4545
return sysConfigEL7(glbEnv)
46-
elif distribution in ["RHEL8", "RHEL9"]:
46+
elif distribution in ["Fedora", "RHEL8", "RHEL9", "RHEL10"]:
4747
return sysConfigEL(glbEnv)
4848
elif distribution == "SUSE":
4949
return sysConfigSUSE(glbEnv)
@@ -183,9 +183,10 @@ def __init__(self, glbEnv):
183183
networkConfigRedhat(self),
184184
libvirtConfigRedhat(self),
185185
firewallConfigAgent(self),
186+
nfsConfig(self),
186187
cloudAgentConfig(self)]
187188

188-
#it covers RHEL6/Fedora13/Fedora14
189+
#it covers RHEL6
189190
class sysConfigEL6(sysConfigAgentRedhatBase):
190191
def __init__(self, glbEnv):
191192
super(sysConfigEL6, self).__init__(glbEnv)

python/lib/cloudutils/utilities.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ def __init__(self):
124124
version.find("Red Hat Enterprise Linux release 9") != -1 or version.find("Linux release 9.") != -1 or
125125
version.find("Linux release 9") != -1):
126126
self.distro = "RHEL9"
127+
elif (version.find("Red Hat Enterprise Linux Server release 10") != -1 or version.find("Scientific Linux release 10") != -1 or
128+
version.find("Red Hat Enterprise Linux release 10") != -1 or version.find("Linux release 10.") != -1 or
129+
version.find("Linux release 10") != -1):
130+
self.distro = "RHEL10"
127131
elif version.find("CentOS") != -1:
128132
self.distro = "CentOS"
129133
else:

0 commit comments

Comments
 (0)