mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
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
This commit is contained in:
parent
16b7b71e36
commit
6b4adbb20a
@ -20,6 +20,19 @@ import os
|
|||||||
import logging
|
import logging
|
||||||
import sys
|
import sys
|
||||||
import socket
|
import socket
|
||||||
|
|
||||||
|
# ---- This snippet of code adds the sources path and the waf configured PYTHONDIR to the Python path ----
|
||||||
|
# ---- We do this so cloud_utils can be looked up in the following order:
|
||||||
|
# ---- 1) Sources directory
|
||||||
|
# ---- 2) waf configured PYTHONDIR
|
||||||
|
# ---- 3) System Python path
|
||||||
|
for pythonpath in (
|
||||||
|
"@PYTHONDIR@",
|
||||||
|
os.path.join(os.path.dirname(__file__),os.path.pardir,os.path.pardir,"python","lib"),
|
||||||
|
):
|
||||||
|
if os.path.isdir(pythonpath): sys.path.insert(0,pythonpath)
|
||||||
|
# ---- End snippet of code ----
|
||||||
|
|
||||||
from cloudutils.cloudException import CloudRuntimeException, CloudInternalException
|
from cloudutils.cloudException import CloudRuntimeException, CloudInternalException
|
||||||
from cloudutils.utilities import initLoging, bash
|
from cloudutils.utilities import initLoging, bash
|
||||||
from cloudutils.configFileOps import configFileOps
|
from cloudutils.configFileOps import configFileOps
|
||||||
|
|||||||
@ -20,6 +20,19 @@ import sys
|
|||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
from threading import Timer
|
from threading import Timer
|
||||||
|
|
||||||
|
# ---- This snippet of code adds the sources path and the waf configured PYTHONDIR to the Python path ----
|
||||||
|
# ---- We do this so cloud_utils can be looked up in the following order:
|
||||||
|
# ---- 1) Sources directory
|
||||||
|
# ---- 2) waf configured PYTHONDIR
|
||||||
|
# ---- 3) System Python path
|
||||||
|
for pythonpath in (
|
||||||
|
"@PYTHONDIR@",
|
||||||
|
os.path.join(os.path.dirname(__file__),os.path.pardir,os.path.pardir,"python","lib"),
|
||||||
|
):
|
||||||
|
if os.path.isdir(pythonpath): sys.path.insert(0,pythonpath)
|
||||||
|
# ---- End snippet of code ----
|
||||||
|
|
||||||
from xml.dom.minidom import parse
|
from xml.dom.minidom import parse
|
||||||
from cloudutils.configFileOps import configFileOps
|
from cloudutils.configFileOps import configFileOps
|
||||||
from cloudutils.networkConfig import networkConfig
|
from cloudutils.networkConfig import networkConfig
|
||||||
|
|||||||
@ -16,13 +16,27 @@
|
|||||||
# specific language governing permissions and limitations
|
# specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
# ---- This snippet of code adds the sources path and the waf configured PYTHONDIR to the Python path ----
|
||||||
|
# ---- We do this so cloud_utils can be looked up in the following order:
|
||||||
|
# ---- 1) Sources directory
|
||||||
|
# ---- 2) waf configured PYTHONDIR
|
||||||
|
# ---- 3) System Python path
|
||||||
|
for pythonpath in (
|
||||||
|
"@PYTHONDIR@",
|
||||||
|
os.path.join(os.path.dirname(__file__),os.path.pardir,os.path.pardir,"python","lib"),
|
||||||
|
):
|
||||||
|
if os.path.isdir(pythonpath): sys.path.insert(0,pythonpath)
|
||||||
|
# ---- End snippet of code ----
|
||||||
|
|
||||||
from cloudutils.syscfg import sysConfigFactory
|
from cloudutils.syscfg import sysConfigFactory
|
||||||
from cloudutils.utilities import initLoging, UnknownSystemException
|
from cloudutils.utilities import initLoging, UnknownSystemException
|
||||||
from cloudutils.cloudException import CloudRuntimeException, CloudInternalException
|
from cloudutils.cloudException import CloudRuntimeException, CloudInternalException
|
||||||
from cloudutils.globalEnv import globalEnv
|
from cloudutils.globalEnv import globalEnv
|
||||||
from cloudutils.serviceConfigServer import cloudManagementConfig
|
from cloudutils.serviceConfigServer import cloudManagementConfig
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
initLoging("@MSLOGDIR@/setupManagement.log")
|
initLoging("@MSLOGDIR@/setupManagement.log")
|
||||||
glbEnv = globalEnv()
|
glbEnv = globalEnv()
|
||||||
|
|||||||
@ -39,11 +39,11 @@ class sysConfigAgentFactory:
|
|||||||
return sysConfigAgentUbuntu(glbEnv)
|
return sysConfigAgentUbuntu(glbEnv)
|
||||||
elif distribution == "CentOS" or distribution == "RHEL5":
|
elif distribution == "CentOS" or distribution == "RHEL5":
|
||||||
return sysConfigEL5(glbEnv)
|
return sysConfigEL5(glbEnv)
|
||||||
elif distribution == "Fedora" or distribution == "RHEL6":
|
elif distribution == "RHEL6":
|
||||||
return sysConfigEL6(glbEnv)
|
return sysConfigEL6(glbEnv)
|
||||||
elif distribution == "RHEL7":
|
elif distribution == "RHEL7":
|
||||||
return sysConfigEL7(glbEnv)
|
return sysConfigEL7(glbEnv)
|
||||||
elif distribution in ["RHEL8", "RHEL9"]:
|
elif distribution in ["Fedora", "RHEL8", "RHEL9", "RHEL10"]:
|
||||||
return sysConfigEL(glbEnv)
|
return sysConfigEL(glbEnv)
|
||||||
elif distribution == "SUSE":
|
elif distribution == "SUSE":
|
||||||
return sysConfigSUSE(glbEnv)
|
return sysConfigSUSE(glbEnv)
|
||||||
@ -183,9 +183,10 @@ class sysConfigEL5(sysConfigAgentRedhatBase):
|
|||||||
networkConfigRedhat(self),
|
networkConfigRedhat(self),
|
||||||
libvirtConfigRedhat(self),
|
libvirtConfigRedhat(self),
|
||||||
firewallConfigAgent(self),
|
firewallConfigAgent(self),
|
||||||
|
nfsConfig(self),
|
||||||
cloudAgentConfig(self)]
|
cloudAgentConfig(self)]
|
||||||
|
|
||||||
#it covers RHEL6/Fedora13/Fedora14
|
#it covers RHEL6
|
||||||
class sysConfigEL6(sysConfigAgentRedhatBase):
|
class sysConfigEL6(sysConfigAgentRedhatBase):
|
||||||
def __init__(self, glbEnv):
|
def __init__(self, glbEnv):
|
||||||
super(sysConfigEL6, self).__init__(glbEnv)
|
super(sysConfigEL6, self).__init__(glbEnv)
|
||||||
|
|||||||
@ -124,6 +124,10 @@ class Distribution:
|
|||||||
version.find("Red Hat Enterprise Linux release 9") != -1 or version.find("Linux release 9.") != -1 or
|
version.find("Red Hat Enterprise Linux release 9") != -1 or version.find("Linux release 9.") != -1 or
|
||||||
version.find("Linux release 9") != -1):
|
version.find("Linux release 9") != -1):
|
||||||
self.distro = "RHEL9"
|
self.distro = "RHEL9"
|
||||||
|
elif (version.find("Red Hat Enterprise Linux Server release 10") != -1 or version.find("Scientific Linux release 10") != -1 or
|
||||||
|
version.find("Red Hat Enterprise Linux release 10") != -1 or version.find("Linux release 10.") != -1 or
|
||||||
|
version.find("Linux release 10") != -1):
|
||||||
|
self.distro = "RHEL10"
|
||||||
elif version.find("CentOS") != -1:
|
elif version.find("CentOS") != -1:
|
||||||
self.distro = "CentOS"
|
self.distro = "CentOS"
|
||||||
else:
|
else:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user