Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
130 commits
Select commit Hold shift + click to select a range
3cac7f0
Revert "CLOUDSTACK-6278"
ke4qqq Oct 13, 2014
ac48aa8
cleaning up some from a revert
ke4qqq Oct 13, 2014
ffe8466
more revert cleanup
ke4qqq Oct 13, 2014
f456cda
CLOUDSTACK-7561: UI: After creating a new account, the "Add Account" …
GaborApatiNagy Sep 16, 2014
4fd0799
CLOUDSTACK-7562: Details page for disk offerings only show details fo…
GaborApatiNagy Sep 16, 2014
8f4e8a4
CLOUDSTACK-7587 - Automation - Add simulator_only attribute to acl re…
Sep 19, 2014
988b9ef
CLOUDSTACK-7588: [Vmware] Creating templates (with same names) from v…
nitinmeh Sep 19, 2014
9bbcef4
IOPS null issue CLOUDSTACK-7570
punith-s Sep 17, 2014
b979c6f
CLOUDSTACK-7589: VM not Starting and always stuck in Stopped state after
minchen07 Sep 19, 2014
e0317ee
CLOUDSTACK-7494. Migration of a vm fails on Hyper-V. In an earlier co…
devdeep Sep 19, 2014
b771b6e
CLOUDSTACK-7579 Adding a method to base.py to update storage pool
prashantkm Sep 19, 2014
ce2fe3e
In case of Hyper-v ssvm/cpvm reboot takes time so made changes to han…
Sep 22, 2014
1b0618d
CLOUDSTACK-7595: Config parameters "job.expire.minutes" and "job.canc…
koushik-das Sep 22, 2014
4076d87
Creating custom disk does not work as expected
Sep 23, 2014
f2eec47
CLOUDSTACK-6603 [Upgrade]DB Exception while Autoscale monitoring afte…
rajesh-battala Jun 9, 2014
5c2094e
CLOUDSTACK-6172: Adding new test case to verify this fix
Sep 18, 2014
b4bddc6
timeInSeconds * 1000
Sep 24, 2014
d036168
cleaning up more conflicts
Sep 24, 2014
555b20f
CLOUDSTACK-7625: UI > IP Address page > EnableVPN > If createRemoteAc…
Sep 24, 2014
3ebf49a
CLOUDSTACK-7628:VM Worker job should be expunged one hour after
minchen07 Sep 25, 2014
7a4a0d7
CLOUDSTACK-7622: Fixed deleting network when provider is disable
Sep 24, 2014
89736d0
CLOUDSTACK-7555 - Fixed the test_usage script - Template now belongs …
pckreddy Sep 16, 2014
43a9bbf
CLOUDSTACK-7598: When a vm deployed by cloudstack is stopped on the h…
devdeep Sep 25, 2014
cd3df84
CLOUDSTACK-7631: Log rotate on VR may fail as /etc/init.d/rsyslog doe…
Sakshams Sep 25, 2014
a355213
CID-1223274: Remove dead local storage code from VolumeApiServiceImpl
rohityadavcloud Sep 25, 2014
a420028
XenServer56FP1Resource: remove unused import
rohityadavcloud Sep 25, 2014
fbb9e2b
CID-1192798: Remove unused boolean variable
rohityadavcloud Sep 25, 2014
ff42d5a
CID-1211005: Fix comparison, Class<?> is always instance of Class
rohityadavcloud Sep 25, 2014
4d8dfc9
CID-1192810: Remove useless control flow
rohityadavcloud Sep 25, 2014
6e04f93
CID-1192822: ids is a List<Long>, the cast to List<?> is removed
rohityadavcloud Sep 25, 2014
eb3773c
CID-1223272: Remove DLS code, exceptions and logging handled at lower…
rohityadavcloud Sep 25, 2014
b4a2640
CLOUDSTACK-7633: fix "Provides" in most LSB headers
vincentbernat Sep 25, 2014
5309aa3
CID-1222206: Remove DLS from XenServer56FP1Resource
rohityadavcloud Sep 25, 2014
a329a9b
CID-1232342: Fix DLS in createOrUpdateRecord in GloboDnsResource
rohityadavcloud Sep 25, 2014
d39c290
CLOUDSTACK-7634: UI > Project Dropdown on top menu > not all projects…
Sep 25, 2014
3fd97ca
Fixed Encoding issue to message_ja_JP & message_zh_CN properties files.
Sep 25, 2014
059633d
CLOUDSTACK-7617: Removed hard coded VM names and skipped test cases a…
Sep 24, 2014
09420dd
List ISO's test to verify default ISO's are listed always
Sep 26, 2014
549840d
CLOUDSTACK-7495. Volume resize is only supported on kvm, vmware and x…
devdeep Sep 26, 2014
e43d5b1
CLOUDSTACK-7575: improved performance of cleanString method in String…
anshulgangwar Sep 18, 2014
42b604d
CLOUDSTACK-7610,CLOUDSTACK-7611,CLOUDSTACK-7612: Fixed following bugs…
anshulgangwar Sep 23, 2014
20a0763
CLOUDSTACK-7499: Adding test cases for VMLC test path
Sep 5, 2014
f22b0cf
CLOUDSTACK-7603: Fixed test_escalations_network.py - test suite shoul…
Sep 24, 2014
d6970d4
CLOUDSTACK-7616: Fixed test_escalations_ipaddress.py - test suite sho…
Sep 24, 2014
285cdae
Test script to verify vm deployment with two networks in SG enabled a…
Aug 13, 2014
ecb6625
CLOUDSTACK-7408: Fixed - Private key of the ssh keypair was getting c…
Sep 23, 2014
2116f7d
Additional Guest OS support for vGPU Test Automation
Sep 26, 2014
354cb21
CLOUDSTACK-7637: UI > fix a bug produced by 4.5 feature "template acc…
Sep 26, 2014
83967c9
CLOUDSTACK-7641: Do not always ask libvirt to refresh a storage pool
wido Sep 28, 2014
d97ad97
CLOUDSTACK-7373: Incorrect Japanese keyboard mapping with CentOS CLI …
sanjaytripathi Sep 25, 2014
26ac4dd
CLOUDSTACK-7615: Update log msg to print error msg rather than exception
Sep 29, 2014
69d1b44
cloudmanagementserver.keystore is corrupted by ant.filters.ReplaceT…
Sep 29, 2014
f2b6aa4
CLOUDSTACK-7647: Fix 'isReverse' checkboxes which are checked by default
bfederle Sep 29, 2014
e338cdd
BUG-ID: CLOUDSTACK-7652. [VMware] 'SOAPFaultException: The object has…
Sep 23, 2014
9f653d7
BUG-ID: CLOUDSTACK-7653. VM's are not getting deleted from hypervisor…
Sep 8, 2014
26b501b
CLOUDSTACK-7197: Added new system template DB changes in 4.5 upgrade.…
kishankavala Sep 30, 2014
ee23be1
when system VM ping times out, stop system VM
Sep 30, 2014
e1d554c
Revert "CLOUDSTACK-7647: Fix 'isReverse' checkboxes which are checked…
Sep 30, 2014
09cc238
add guest OS Centos 7 and Oracle Linux 7
Sep 30, 2014
fa5c42c
Undo "Revert "CLOUDSTACK-7647"
bfederle Sep 30, 2014
ae0bf7d
speed up template download: don't sync io for each write
sudison Sep 30, 2014
9278a63
fix checkstyle
sudison Oct 1, 2014
b29d075
CLOUDSTACK-7657: cloud.log is being rotated by multiple rotation poli…
Sakshams Oct 1, 2014
759b5fa
For network stats aggregation job, get the most recent mgmt server id…
kishankavala Oct 1, 2014
54110ed
CLOUDSTACK-6969. Data Volume Shrink operation failing with "Unexpecte…
Oct 1, 2014
4b581bf
BUG-ID: CLOUDSTACK-7662. Resize of detached volume fails.
Aug 13, 2013
14ace9e
CLOUDSTACK-7663: Fix typo in response name string: there is an extra 's'
Sakshams Oct 1, 2014
47d2a57
CLOUDSTACK-6650: Reorder Cluster list in deployment planner to protect
sanjaytripathi Oct 1, 2014
38e4be8
CLOUDSTACK-7664: [UI] Handle change in API response for listloadbalancer
Oct 1, 2014
3540828
added more log for create vm snapshot
Oct 1, 2014
dba4a8c
cleaning more conflicts
spark404 Sep 24, 2014
160aa84
CLOUDSTACK-7665 File.separator shouldn't be used in this case, the
spark404 Oct 2, 2014
5990ed4
Move the PrepareKickstartPxeServerCommand to the core api so other
spark404 Sep 30, 2014
28f8c41
CLOUDSTACK-7645: [UI] Fixing incorrect labels, including instances of…
Oct 1, 2014
0b4c1a9
Remove adding implicit tags in DB schema so that management server st…
amoghv Oct 2, 2014
5f79fa3
Revert "Remove adding implicit tags in DB schema so that management s…
amoghv Oct 2, 2014
a9761a3
CLOUDSTACK-7668: UI > When UI is loaded the first time, sometimes a b…
Oct 2, 2014
ba18628
ccp should not check public ip resource when deploy a vm on shared ne…
Oct 2, 2014
8ce829a
CLOUDSTACK-7668: UI > When UI is loaded the first time, sometimes a b…
Oct 3, 2014
c8c9f1d
Revert "CLOUDSTACK-7533: Wrong download URL is generated when using m…
nitinmeh Oct 6, 2014
93b9ef8
CLOUDSTACK-6478:Fix a typo in RemoteHostEndPoint.setId().
minchen07 Oct 6, 2014
c90db15
CLOUDSTACK-6282-Added hyper-v hypervisor checks for automated tests
vinayv559 Oct 1, 2014
0df4319
Fixed few coverity issues
sedukull Oct 7, 2014
42fd2d9
CLOUDSTACK-7654 fixed issues with zip format templates.
rajesh-battala Oct 7, 2014
7bea2f7
CLOUDSTACK-7671: Management server restart failed after reboot
Oct 6, 2014
9605f57
CLOUDSTACK-7679: bump up the RabbitMQ AMQP java client version from
murali-reddy Oct 7, 2014
0e2e1df
CLOUDSTACK-7680:Adding kwargs to volume.upload in base.py
prashantkm Oct 7, 2014
d058fa6
CLOUDSTACK-6650: Reorder Cluster list in deployment planner to protect
sanjaytripathi Oct 7, 2014
54a2bb0
CLOUDSTACK-7649: test_lb_secondary_ip.py - Removed SSH trying step af…
Oct 1, 2014
f583dcb
CLOUDSTACK-7644: test_persistent_networks.py - SSH failure in case of…
Sep 29, 2014
f3196d6
CLOUDSTACK-7646: test_nuage_vsp.py - Fixed basic indentation issues, …
Sep 29, 2014
35dab49
CLOUDSTACK-7681: UI > zone wizard > Advanced zone > hypervisor => do …
Oct 7, 2014
cfb372a
CLOUDSTACK-7661: VM wizard: Add keyboard language dropdown
bfederle Oct 7, 2014
a516e5d
Revert "CLOUDSTACK-7671: Management server restart failed after reboot"
nitinmeh Oct 7, 2014
9714ecb
CLOUDSTACK-4987: UI > Instances > detailView > NICs tab > Add network…
Oct 7, 2014
1916bd2
CLOUDSTACK-3195: UI > IP Address > detailView > Configuration tab > P…
Oct 7, 2014
372ad94
CLOUDSTACK-7632:Automation for volume life cycle testPath
Sep 30, 2014
eb447f1
CLOUDSTACK:7323: [vGPU] Creation of VM snapshot with "memory" is fail…
sanjaytripathi Oct 8, 2014
dfdf9ed
updated packge scripts to support simularot rpm build
Sep 18, 2014
70f74ee
CLOUDSTACK-7661: UI > VM Wizard > Keyboard Language > send new parame…
Oct 8, 2014
dd335aa
CLOUDSTACK-5359: UI > Infrastructure > Clusters > Add Cluster > Publi…
Oct 8, 2014
db79dd1
CLOUDSTACK-2625, CLOUDSTACK-3401: Usage records are ordered by start_…
kishankavala Oct 9, 2014
51d274b
CLOUDSTACK-5719: UI > Network > Add Guest Network > when Physical Net…
Oct 9, 2014
da73d73
Revert "CLOUDSTACK-6650: Reorder Cluster list in deployment planner t…
amoghv Oct 9, 2014
3b65a59
kvm: Add better logging when fetching a volume from libvirt
wido Oct 9, 2014
0fd9c43
vmware resource code needs to honor the timeout value send
sudison Oct 9, 2014
27924d1
if libvirt version is < 10.10(below rhel 6.5), won't set nic throttling
sudison Oct 9, 2014
52c6c90
fix build
sudison Oct 9, 2014
6e9d3b6
if guest network type is vlan://untagged, and traffic label is used, …
sudison Oct 9, 2014
c10189f
if vpc public network with snat enabled, then will triger this issue;
sudison Oct 9, 2014
1c1485e
disable parallel for xenserver. Also for vmware, if full.clone is ena…
sudison Oct 10, 2014
003269e
since max_guest_vm for XS 6.2.0 is 500, change max_guest_vm for XS 6.…
Oct 10, 2014
50ee981
CLOUDSTACK-6826: Improving the download url expiration where the expi…
nitinmeh Oct 10, 2014
a6d575b
CLOUDSTACK-7699: Disable ROOT volume attach/detach ability.
nitinmeh Oct 13, 2014
0db0e5e
CLOUDSTACK-7700: Volume Snapshot Async Job returns Success for a failed
minchen07 Oct 13, 2014
176e0d4
CLOUDSTACK-6650: Reorder Cluster list in deployment planner to protect
sanjaytripathi Oct 14, 2014
e7fa3a2
CLOUDSTACK-7563: Fix potential NPE from FingBugs.
minchen07 Oct 14, 2014
26f3e84
CLOUDSTACK-7723: UI > Storage > detail view > add Disk Offering field.
Oct 14, 2014
71c9804
Fixing possible formatting issue with license header, causing builds …
amoghv Oct 14, 2014
159a372
CLOUDSTACK-7693: Fixing pep8 issues
Oct 9, 2014
ac820a3
CLOUDSTACK-7690: Added missing unittest import to test_escalations_vo…
Oct 9, 2014
42f628c
CLOUDSTACK-7532: Template status is not shown in UI/API response for …
nitinmeh Oct 15, 2014
080bc2e
CLOUDSTACK-7536 user vm can get a gateway ip when gateway ip is a par…
bvbharat Sep 24, 2014
f488a8f
CLOUDSTACK-7728: Fixed adding icmp rules with different types and codes
Oct 15, 2014
e257c13
CLOUDSTACK-7728: Fixed adding iptables rules for egress allow on VR r…
Oct 15, 2014
53ee4cd
CLOUDSTACK-7728: Removed duplicate import
Oct 16, 2014
80e0c99
Removed duplicate code and unused imports which was causing build fai…
sanjaytripathi Oct 16, 2014
5025071
Config value having different category in SQL and Config.java.
sanjaytripathi Oct 15, 2014
420d4e0
CLOUDSTACK-7739: Add new vGPU types K160Q, K180Q, K280Q to the CloudS…
sanjaytripathi Oct 15, 2014
148efbb
Merge remote-tracking branch 'origin/4.5' into merge-master
DaanHoogland Oct 16, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion api/src/com/cloud/event/EventTypes.java
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,6 @@ public class EventTypes {
public static final String EVENT_BAREMETAL_PXE_SERVER_ADD = "PHYSICAL.PXE.ADD";
public static final String EVENT_BAREMETAL_PXE_SERVER_DELETE = "PHYSICAL.PXE.DELETE";
public static final String EVENT_BAREMETAL_RCT_ADD = "BAREMETAL.RCT.ADD";
public static final String EVENT_BAREMETAL_PROVISION_DONE = "BAREMETAL.PROVISION.DONE";

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we want this?

public static final String EVENT_AFFINITY_GROUP_CREATE = "AG.CREATE";
public static final String EVENT_AFFINITY_GROUP_DELETE = "AG.DELETE";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
Expand All @@ -15,8 +16,8 @@
// specific language governing permissions and limitations
// under the License.
//
// Automatically generated by addcopyright.py at 01/29/2013
package com.cloud.baremetal.networkservice;

package com.cloud.agent.api.baremetal;

import com.cloud.agent.api.Command;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,7 @@
>

<bean id="BaremetalManager" class="com.cloud.baremetal.manager.BaremetalManagerImpl" />
<bean id="BaremetalVlanManager" class="com.cloud.baremetal.manager.BaremetalVlanManagerImpl" >
<property name="backends">
<map>
<entry key="Force10" value-ref="Force10BaremetalSwitchBackend"/>
</map>
</property>
</bean>
<bean id="BaremetalVlanManager" class="com.cloud.baremetal.manager.BaremetalVlanManagerImpl" />
<bean id="Force10BaremetalSwitchBackend" class="com.cloud.baremetal.networkservice.Force10BaremetalSwitchBackend" />

<bean id="BaremetalKickStartPxeService"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,9 @@

import com.cloud.utils.component.Manager;
import com.cloud.utils.component.PluggableService;
import org.apache.cloudstack.api.BaremetalProvisionDoneNotificationCmd;

public interface BaremetalManager extends Manager, PluggableService {
public static final String EchoSecurityGroupAgent = "EchoSecurityGroupAgent";
public static final String ExternalBaremetalSystemUrl = "ExternalBaremetalSystemUrl";
public static final String DO_PXE = "doPxe";

void notifyProvisionDone(BaremetalProvisionDoneNotificationCmd cmd);
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ public class BaremetalManagerImpl extends ManagerBase implements BaremetalManage

@Inject
protected HostDao _hostDao;
@Inject
protected VMInstanceDao vmDao;

@Override
public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
Expand Down Expand Up @@ -118,7 +116,6 @@ public boolean postStateTransitionEvent(StateMachine2.Transition<State, Event> t
public List<Class<?>> getCommands() {
List<Class<?>> cmds = new ArrayList<Class<?>>();
cmds.add(AddBaremetalHostCmd.class);
cmds.add(BaremetalProvisionDoneNotificationCmd.class);
return cmds;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
package com.cloud.baremetal.manager;

import com.cloud.baremetal.networkservice.BaremetalRctResponse;
import com.cloud.baremetal.networkservice.BaremetalSwitchBackend;
import com.cloud.deploy.DeployDestination;
import com.cloud.network.Network;
import com.cloud.utils.component.Manager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
Expand All @@ -69,17 +70,13 @@ public class BaremetalVlanManagerImpl extends ManagerBase implements BaremetalVl
@Inject
private AccountManager acntMgr;

private Map<String, BaremetalSwitchBackend> backends;
private Map<String, BaremetalSwitchBackend> backends = new HashMap<>();

private class RackPair {
BaremetalRct.Rack rack;
BaremetalRct.HostEntry host;
}

public void setBackends(Map<String, BaremetalSwitchBackend> backends) {
this.backends = backends;
}

@Override
public BaremetalRctResponse addRct(AddBaremetalRctCmd cmd) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,12 @@
import com.cloud.hypervisor.Hypervisor;
import com.cloud.resource.ServerResource;
import com.cloud.utils.component.ManagerBase;
import com.cloud.utils.db.QueryBuilder;
import com.cloud.utils.db.SearchCriteria;
import com.cloud.utils.exception.CloudRuntimeException;
import com.cloud.utils.script.OutputInterpreter;
import com.cloud.utils.script.Script;
import com.cloud.utils.script.Script2;
import com.cloud.utils.script.Script2.ParamType;
import com.cloud.vm.VMInstanceVO;
import com.cloud.vm.VirtualMachine;
import com.cloud.vm.VirtualMachine.PowerState;
import com.cloud.vm.dao.VMInstanceDao;
import org.apache.cloudstack.api.ApiConstants;
Expand Down Expand Up @@ -110,8 +107,6 @@ public class BareMetalResourceBase extends ManagerBase implements ServerResource
protected Script2 _bootOrRebootCommand;
protected String _vmName;
protected int ipmiRetryTimes = 5;
protected boolean provisionDoneNotificationOn = false;
protected int isProvisionDoneNotificationTimeout = 1800;

protected ConfigurationDao configDao;
protected VMInstanceDao vmDao;
Expand Down Expand Up @@ -186,13 +181,6 @@ public boolean configure(String name, Map<String, Object> params) throws Configu
s_logger.debug(e.getMessage(), e);
}

try {
provisionDoneNotificationOn = Boolean.valueOf(configDao.getValue(Config.BaremetalProvisionDoneNotificationEnabled.key()));
isProvisionDoneNotificationTimeout = Integer.valueOf(configDao.getValue(Config.BaremetalProvisionDoneNotificationTimeout.key()));
} catch (Exception e) {
s_logger.debug(e.getMessage(), e);
}

String injectScript = "scripts/util/ipmi.py";
String scriptPath = Script.findScript("", injectScript);
if (scriptPath == null) {
Expand Down Expand Up @@ -404,7 +392,7 @@ public PingCommand getCurrentStatus(long id) {
VMInstanceVO vm = vms.get(0);
SecurityGroupHttpClient client = new SecurityGroupHttpClient();
HashMap<String, Pair<Long, Long>> nwGrpStates = client.sync(vm.getInstanceName(), vm.getId(), vm.getPrivateIpAddress());
return new PingRoutingWithNwGroupsCommand(getType(), id, null, nwGrpStates);
return new PingRoutingWithNwGroupsCommand(getType(), id, getHostVmStateReport(), nwGrpStates);
}
} else {
return new PingRoutingCommand(getType(), id, null);
Expand Down Expand Up @@ -593,39 +581,6 @@ protected StartAnswer execute(StartCommand cmd) {
}
}

if (provisionDoneNotificationOn) {
QueryBuilder<VMInstanceVO> q = QueryBuilder.create(VMInstanceVO.class);
q.and(q.entity().getInstanceName(), SearchCriteria.Op.EQ, vm.getName());
VMInstanceVO vmvo = q.find();

if (vmvo.getLastHostId() == null) {
// this is new created vm
long timeout = System.currentTimeMillis() + TimeUnit.SECONDS.toMillis(isProvisionDoneNotificationTimeout);
while (timeout > System.currentTimeMillis()) {
try {
TimeUnit.SECONDS.sleep(5);
} catch (InterruptedException e) {
s_logger.warn(e.getMessage(), e);
}

q = QueryBuilder.create(VMInstanceVO.class);
q.and(q.entity().getInstanceName(), SearchCriteria.Op.EQ, vm.getName());
vmvo = q.find();
if (vmvo == null) {
return new StartAnswer(cmd, String.format("cannot find vm[name:%s] while waiting for baremtal provision done notification", vm.getName()));
}

if (VirtualMachine.State.Running == vmvo.getState()) {
return new StartAnswer(cmd);
}

s_logger.debug(String.format("still wait for baremetal provision done notification for vm[name:%s], current vm state is %s", vmvo.getInstanceName(), vmvo.getState()));
}

return new StartAnswer(cmd, String.format("timeout after %s seconds, no baremetal provision done notification received. vm[name:%s] failed to start", isProvisionDoneNotificationTimeout, vm.getName()));
}
}

s_logger.debug("Start bare metal vm " + vm.getName() + "successfully");
_vmName = vm.getName();
return new StartAnswer(cmd);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import com.cloud.agent.api.HostVmStateReportEntry;
import com.cloud.agent.api.PingCommand;
import com.cloud.agent.api.PingRoutingCommand;
import com.cloud.agent.api.baremetal.PrepareKickstartPxeServerCommand;
import com.cloud.agent.api.routing.VmDataCommand;
import com.cloud.utils.exception.CloudRuntimeException;
import com.cloud.utils.script.Script;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,16 @@
import javax.ejb.Local;
import javax.inject.Inject;

import com.cloud.configuration.Config;
import org.apache.log4j.Logger;

import org.apache.cloudstack.api.AddBaremetalKickStartPxeCmd;
import org.apache.cloudstack.api.AddBaremetalPxeCmd;
import org.apache.cloudstack.api.ListBaremetalPxeServersCmd;
import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
import org.apache.log4j.Logger;

import com.cloud.agent.api.Answer;
import com.cloud.agent.api.baremetal.IpmISetBootDevCommand;
import com.cloud.agent.api.baremetal.IpmISetBootDevCommand.BootDev;
import com.cloud.agent.api.baremetal.PrepareKickstartPxeServerCommand;
import com.cloud.baremetal.database.BaremetalPxeDao;
import com.cloud.baremetal.database.BaremetalPxeVO;
import com.cloud.baremetal.networkservice.BaremetalPxeManager.BaremetalPxeType;
Expand Down Expand Up @@ -224,11 +223,6 @@ private boolean preparePxeInAdvancedZone(VirtualMachineProfile profile, NicProfi
throw new CloudRuntimeException(String.format("cannot find management nic on virtual router[id:%s]", vr.getId()));
}

String internalServerIp = _configDao.getValue(Config.BaremetalInternalStorageServer.key());
if (internalServerIp == null) {
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"));
}

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());
Expand All @@ -238,7 +232,7 @@ private boolean preparePxeInAdvancedZone(VirtualMachineProfile profile, NicProfi
throw new CloudRuntimeException(String.format("failed preparing PXE in virtual router[id:%s], because %s", vr.getId(), ret.second()));
}

//String internalServerIp = "10.223.110.231";
String internalServerIp = "10.223.110.231";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hardcoded internalServerIp? Is this dead code?

cmd = String.format("/opt/cloud/bin/baremetal_snat.sh %s %s %s", mgmtNic.getIp4Address(), internalServerIp, mgmtNic.getGateway());
s_logger.debug(String.format("prepare SNAT on virtual router[ip:%s], cmd: %s", mgmtNic.getIp4Address(), cmd));
ret = SshHelper.sshExecute(mgmtNic.getIp4Address(), 3922, "root", getSystemVMKeyFile(), null, cmd);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import com.cloud.baremetal.database.BaremetalPxeVO;
import com.cloud.baremetal.manager.BaremetalVlanManager;
import com.cloud.dc.DataCenter;
import com.cloud.dc.DataCenterVO;
import com.cloud.dc.Pod;
import com.cloud.dc.dao.DataCenterDao;
import com.cloud.deploy.DeployDestination;
Expand Down Expand Up @@ -140,9 +139,11 @@ public boolean prepare(Network network, NicProfile nic, VirtualMachineProfile vm
}
}

/*
if (dest.getDataCenter().getNetworkType() == DataCenter.NetworkType.Advanced){
prepareVlan(network, dest);
}
*/

return true;
}
Expand All @@ -158,10 +159,12 @@ public boolean release(Network network, NicProfile nic, VirtualMachineProfile vm
return false;
}

/*
DataCenterVO dc = zoneDao.findById(vm.getVirtualMachine().getDataCenterId());
if (dc.getNetworkType() == DataCenter.NetworkType.Advanced) {
releaseVlan(network, vm);
}
*/
return true;
}

Expand Down
Loading