mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Merge remote-tracking branch 'origin/4.11'
This commit is contained in:
commit
84994c841f
@ -90,6 +90,10 @@ under the License.
|
||||
<priority value="INFO"/>
|
||||
</category>
|
||||
|
||||
<category name="org.apache.http.wire">
|
||||
<priority value="INFO"/>
|
||||
</category>
|
||||
|
||||
<!-- ======================= -->
|
||||
<!-- Setup the Root category -->
|
||||
<!-- ======================= -->
|
||||
|
||||
@ -226,11 +226,16 @@ public class BaremetalKickStartServiceImpl extends BareMetalPxeServiceBase imple
|
||||
throw new CloudRuntimeException(String.format("please specify 'baremetal.internal.storage.server.ip', which is the http server/nfs server storing kickstart files and ISO files, in global setting"));
|
||||
}
|
||||
|
||||
Pair<Boolean, String> ret = SshHelper.sshExecute(mgmtNic.getIPv4Address(), 3922, "root", getSystemVMKeyFile(), null, "systemctl start baremetal-vr");
|
||||
if (!ret.first()) {
|
||||
throw new CloudRuntimeException(String.format("failed to start baremetal agent in virtual router[id:%s]", vr.getId()));
|
||||
}
|
||||
|
||||
List<String> tuple = parseKickstartUrl(profile);
|
||||
String cmd = String.format("/opt/cloud/bin/prepare_pxe.sh %s %s %s %s %s %s", tuple.get(1), tuple.get(2), profile.getTemplate().getUuid(),
|
||||
String.format("01-%s", nic.getMacAddress().replaceAll(":", "-")).toLowerCase(), tuple.get(0), nic.getMacAddress().toLowerCase());
|
||||
s_logger.debug(String.format("prepare pxe on virtual router[ip:%s], cmd: %s", mgmtNic.getIPv4Address(), cmd));
|
||||
Pair<Boolean, String> ret = SshHelper.sshExecute(mgmtNic.getIPv4Address(), 3922, "root", getSystemVMKeyFile(), null, cmd);
|
||||
ret = SshHelper.sshExecute(mgmtNic.getIPv4Address(), 3922, "root", getSystemVMKeyFile(), null, cmd);
|
||||
if (!ret.first()) {
|
||||
throw new CloudRuntimeException(String.format("failed preparing PXE in virtual router[id:%s], because %s", vr.getId(), ret.second()));
|
||||
}
|
||||
|
||||
@ -60,3 +60,6 @@ net.ipv6.conf.all.forwarding = 0
|
||||
net.ipv6.conf.all.accept_ra = 0
|
||||
net.ipv6.conf.all.accept_redirects = 0
|
||||
net.ipv6.conf.all.autoconf = 0
|
||||
|
||||
# Minimum swappiness without disabling it
|
||||
vm.swappiness=1
|
||||
|
||||
5
systemvm/debian/etc/systemd/journald.conf
Normal file
5
systemvm/debian/etc/systemd/journald.conf
Normal file
@ -0,0 +1,5 @@
|
||||
[Journal]
|
||||
Compress=yes
|
||||
SystemMaxUse=40M
|
||||
SystemMaxFileSize=10M
|
||||
RuntimeMaxUse=20M
|
||||
12
systemvm/debian/etc/systemd/system/baremetal-vr.service
Normal file
12
systemvm/debian/etc/systemd/system/baremetal-vr.service
Normal file
@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=CloudStack Baremetal VR service
|
||||
After=network.target local-fs.target
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/cloud/bin
|
||||
ExecStart=/usr/bin/python /opt/cloud/bin/baremetal-vr.py
|
||||
Restart=on-failure
|
||||
@ -2,7 +2,7 @@
|
||||
Description=CloudStack post-patching init script
|
||||
After=cloud-early-config.service network.target local-fs.target
|
||||
Before=ssh.service
|
||||
Requires=network.service
|
||||
Requires=networking.service
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
@ -21,6 +21,9 @@
|
||||
# Eject cdrom if any
|
||||
eject || true
|
||||
|
||||
# Restart journald for setting changes to apply
|
||||
systemctl restart systemd-journald
|
||||
|
||||
TYPE=$(grep -Po 'type=\K[a-zA-Z]*' /var/cache/cloud/cmdline)
|
||||
if [ "$TYPE" == "router" ] || [ "$TYPE" == "vpcrouter" ] || [ "$TYPE" == "dhcpsrvr" ]
|
||||
then
|
||||
@ -59,8 +62,3 @@ fi
|
||||
systemctl enable --now --no-block ssh
|
||||
|
||||
date > /var/cache/cloud/boot_up_done
|
||||
|
||||
if [ "$TYPE" == "router" ]
|
||||
then
|
||||
python /opt/cloud/bin/baremetal-vr.py &
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user