Branch 'repo-sync' - backend/satellite_tools
by Pradeep Kilambi
backend/satellite_tools/repo_plugins/Makefile | 27 ++++++++++++++++++++++++++
backend/satellite_tools/spacewalk-debug.8 | 20 +++++++------------
2 files changed, 35 insertions(+), 12 deletions(-)
New commits:
commit 27676a0db884611b0326b797b6fd6b97e7f33300
Author: Pradeep Kilambi <pkilambi(a)redhat.com>
Date: Wed Jul 29 16:50:13 2009 -0400
adding makefile to repo_plugins
diff --git a/backend/satellite_tools/repo_plugins/Makefile b/backend/satellite_tools/repo_plugins/Makefile
new file mode 100644
index 0000000..556fb17
--- /dev/null
+++ b/backend/satellite_tools/repo_plugins/Makefile
@@ -0,0 +1,27 @@
+# Makefile for repo sync plugins
+#
+# $Id: Makefile $
+#
+# Copyright (c) 2009 Red Hat, Inc.
+#
+# This software is licensed to you under the GNU General Public License,
+# version 2 (GPLv2). There is NO WARRANTY for this software, express or
+# implied, including the implied warranties of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+# along with this software; if not, see
+# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+#
+# Red Hat trademarks are not licensed under GPLv2. No permission is
+# granted to use or replicate Red Hat trademarks that are incorporated
+# in this software or its documentation.
+#
+#
+
+TOP = ../..
+
+# Specific stuff
+SUBDIR = satellite_tools/repo_plugins
+FILES = __init__ yum_src
+
+include $(TOP)/Makefile.defs
+
diff --git a/backend/satellite_tools/spacewalk-debug.8 b/backend/satellite_tools/spacewalk-debug.8
index 0db3791..2a63608 100644
--- a/backend/satellite_tools/spacewalk-debug.8
+++ b/backend/satellite_tools/spacewalk-debug.8
@@ -1,19 +1,14 @@
-.\" This manpage has been automatically generated by docbook2man
-.\" from a DocBook document. This tool can be found at:
-.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>
-.\" Please send any bug reports, improvements, comments, patches,
-.\" etc. to Steve Cheng <steve(a)ggi-project.org>.
-.TH "SPACEWALK-DEBUG" "8" "11 June 2008" "Version 3.6" ""
-
+.\\" auto-generated by docbook2man-spec $Revision: 1.1 $
+.TH "SPACEWALK-DEBUG" "8" "29 July 2009" "Version 3.6" ""
.SH NAME
-spacewalk-debug \- Debug utility that packages log files and relevant debug information needed for full diagnosis of Spacewalk issues.
+spacewalk-debug \- Debug utility that packages log files and relevant debug information needed for full diagnosis of Spacewalk Server issues.
.SH SYNOPSIS
-
+.sp
.nf
-
-
+
+.sp
\fBspacewalk-debug\fR
-
+.sp
.fi
.SH "DESCRIPTION"
.PP
@@ -45,4 +40,5 @@ satellite-sync(8)
.SH "AUTHORS"
Todd Warner <taw(a)redhat.com>
+
Pradeep Kilambi <pkilambi(a)redhat.com>
14 years, 9 months
java/code
by Partha Aji
java/code/src/com/redhat/rhn/domain/server/NetworkInterface.java | 11
java/code/src/com/redhat/rhn/frontend/action/kickstart/ScheduleKickstartWizardAction.java | 24 -
java/code/src/com/redhat/rhn/frontend/action/kickstart/ssm/SsmKSScheduleAction.java | 5
java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml | 7
java/code/src/com/redhat/rhn/manager/kickstart/KickstartManager.java | 8
java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java | 26 -
java/code/src/com/redhat/rhn/manager/kickstart/SSMScheduleCommand.java | 12
java/code/src/com/redhat/rhn/manager/kickstart/cobbler/CobblerSystemCreateCommand.java | 166 +++-------
java/code/src/com/redhat/rhn/manager/kickstart/cobbler/CobblerVirtualSystemCommand.java | 26 -
java/code/src/org/cobbler/Network.java | 149 ++++++++
java/code/src/org/cobbler/SystemRecord.java | 66 +++
java/code/webapp/WEB-INF/pages/common/fragments/kickstart/schedule/advanced.jspf | 7
java/code/webapp/WEB-INF/pages/common/fragments/kickstart/schedule/ks-wizard.jspf | 2
java/code/webapp/WEB-INF/pages/common/fragments/kickstart/schedule/network-options.jspf | 32 +
java/code/webapp/WEB-INF/struts-config.xml | 2
15 files changed, 365 insertions(+), 178 deletions(-)
New commits:
commit 5136652bd9933a95bf75572d36ecc84ec5c40116
Author: Partha Aji <paji(a)redhat.com>
Date: Wed Jul 29 16:42:08 2009 -0400
51455, 513683, 514291, 513539 - Fixed a bunch of bugs related to KS provisioning.
diff --git a/java/code/src/com/redhat/rhn/domain/server/NetworkInterface.java b/java/code/src/com/redhat/rhn/domain/server/NetworkInterface.java
index 42dba00..69d93db 100644
--- a/java/code/src/com/redhat/rhn/domain/server/NetworkInterface.java
+++ b/java/code/src/com/redhat/rhn/domain/server/NetworkInterface.java
@@ -210,4 +210,15 @@ public class NetworkInterface extends BaseDomainHelper implements
return isIpValid() && isMacValid();
}
+ /**
+ * true if the network card has a public ip address
+ * and can thus useful in the cases of KSing
+ * via ip address
+ * @return true if the NIC has a public ip address.
+ */
+ public boolean isPublic() {
+ return isValid() && !(getIpaddr().equals("127.0.0.1") ||
+ getIpaddr().equals("0.0.0.0"));
+ }
+
}
diff --git a/java/code/src/com/redhat/rhn/frontend/action/kickstart/ScheduleKickstartWizardAction.java b/java/code/src/com/redhat/rhn/frontend/action/kickstart/ScheduleKickstartWizardAction.java
index 1d2cd51..d2956b6 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/kickstart/ScheduleKickstartWizardAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/kickstart/ScheduleKickstartWizardAction.java
@@ -96,10 +96,9 @@ public class ScheduleKickstartWizardAction extends RhnWizardAction {
public static final String HOST_SID = "hostSid";
public static final String VIRT_HOST_IS_REGISTERED = "virtHostIsRegistered";
public static final String TARGET_PROFILE_TYPE = "targetProfileType";
- public static final String NETWORK_TYPE_DHCP = "networkTypeDhcp";
+ public static final String NETWORK_TYPE = "networkType";
public static final String NETWORK_INTERFACE = "networkInterface";
- public static final String DHCP_NETWORK_INTERFACES = "dhcpNetworkInterfaces";
- public static final String STATIC_NETWORK_INTERFACES = "staticNetworkInterfaces";
+ public static final String NETWORK_INTERFACES = "networkInterfaces";
/**
* {@inheritDoc}
*/
@@ -192,15 +191,7 @@ public class ScheduleKickstartWizardAction extends RhnWizardAction {
itr.remove();
}
}
- context.getRequest().setAttribute(STATIC_NETWORK_INTERFACES, nics);
- List<NetworkInterface> dhcpNics = new LinkedList<NetworkInterface>(nics);
- NetworkInterface link = new NetworkInterface();
- link.setName("link");
- dhcpNics.add(0, link);
- context.getRequest().setAttribute(DHCP_NETWORK_INTERFACES, dhcpNics);
- if (form.get(NETWORK_TYPE_DHCP) == null) {
- form.set(NETWORK_TYPE_DHCP, Boolean.TRUE);
- }
+ context.getRequest().setAttribute(NETWORK_INTERFACES, nics);
if (StringUtils.isBlank(form.getString(NETWORK_INTERFACE))) {
String defaultInterface = ConfigDefaults.get().
@@ -215,8 +206,7 @@ public class ScheduleKickstartWizardAction extends RhnWizardAction {
form.set(NETWORK_INTERFACE, server.
findPrimaryNetworkInterface().getName());
}
-
- }
+ }
}
/**
@@ -378,7 +368,7 @@ public class ScheduleKickstartWizardAction extends RhnWizardAction {
if (cmd.getServer().getCobblerId() != null) {
SystemRecord rec = SystemRecord.
lookupById(con, cmd.getServer().getCobblerId());
- if (rec != null && profile.getName().equals(rec.getProfile())) {
+ if (rec != null && profile.getName().equals(rec.getProfile().getName())) {
if (StringUtils.isBlank(form.getString(KERNEL_PARAMS_TYPE))) {
form.set(KERNEL_PARAMS_TYPE, KERNEL_PARAMS_CUSTOM);
form.set(KERNEL_PARAMS, rec.getKernelOptionsString());
@@ -425,8 +415,8 @@ public class ScheduleKickstartWizardAction extends RhnWizardAction {
KickstartHelper helper = new KickstartHelper(ctx.getRequest());
KickstartScheduleCommand cmd = getScheduleCommand(form, ctx,
scheduleTime, helper.getKickstartHost());
-
- cmd.setNetworkDevice(Boolean.TRUE.equals(form.get(NETWORK_TYPE_DHCP)),
+
+ cmd.setNetworkDevice(form.getString(NETWORK_TYPE),
form.getString(NETWORK_INTERFACE));
cmd.setKernelOptions(parseKernelOptions(form, ctx.getRequest(),
form.getString(RequestContext.COBBLER_ID), false));
diff --git a/java/code/src/com/redhat/rhn/frontend/action/kickstart/ssm/SsmKSScheduleAction.java b/java/code/src/com/redhat/rhn/frontend/action/kickstart/ssm/SsmKSScheduleAction.java
index dff1085..dffe2aa 100644
--- a/java/code/src/com/redhat/rhn/frontend/action/kickstart/ssm/SsmKSScheduleAction.java
+++ b/java/code/src/com/redhat/rhn/frontend/action/kickstart/ssm/SsmKSScheduleAction.java
@@ -156,7 +156,9 @@ public class SsmKSScheduleAction extends RhnAction implements Listable {
ScheduleKickstartWizardAction.POST_KERNEL_PARAMS_TYPE));
com.setCustomPostKernelParams(dynaForm.getString(
ScheduleKickstartWizardAction.POST_KERNEL_PARAMS));
-
+ com.setNetworkDevice(dynaForm.getString(ScheduleKickstartWizardAction.NETWORK_TYPE),
+ dynaForm.getString(
+ ScheduleKickstartWizardAction.NETWORK_INTERFACE));
List<ValidatorError> errors = com.store();
return com.getScheduledActions();
}
@@ -166,7 +168,6 @@ public class SsmKSScheduleAction extends RhnAction implements Listable {
* {@inheritDoc}
*/
public List getResult(RequestContext ctx) {
-
if (isIP(ctx.getRequest())) {
return Collections.EMPTY_LIST;
}
diff --git a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
index af98b30..4b67e78 100644
--- a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
+++ b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_en_US.xml
@@ -10094,6 +10094,13 @@ Please note that some manual configuration of these scripts may still be require
</context-group>
</trans-unit>
+ <trans-unit id="kickstart.netconn.dhcp.jsp.link">
+ <source>DHCP using first available interface</source>
+ <context-group name="ctx">
+ <context context-type="sourcefile">/rhn/kickstart/KickstartSystemDetailsEdit</context>
+ </context-group>
+ </trans-unit>
+
<trans-unit id="kickstart.selinux.enforce.policy.jsp.label">
<source>Enforcing - SELinux policy enforced</source>
<context-group name="ctx">
diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartManager.java b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartManager.java
index 4d8a5f8..e78edba 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartManager.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartManager.java
@@ -140,7 +140,7 @@ public class KickstartManager extends BaseManager {
* A kickstart that corresponds to it
*/
NetworkInterface nic = server.getNetworkInterface("eth0");
- if (nic != null && isPublicIpAddress(nic.getIpaddr())) {
+ if (nic != null && nic.isPublic()) {
IpAddress ip = new IpAddress(nic.getIpaddr());
ks = findProfileForIpAddress(ip, server.getOrg());
}
@@ -149,7 +149,7 @@ public class KickstartManager extends BaseManager {
*/
if (ks == null) {
for (NetworkInterface tmp : server.getNetworkInterfaces()) {
- if (isPublicIpAddress(tmp.getIpaddr())) {
+ if (tmp.isPublic()) {
IpAddress ip = new IpAddress(tmp.getIpaddr());
ks = findProfileForIpAddress(ip, server.getOrg());
if (ks != null) {
@@ -161,10 +161,6 @@ public class KickstartManager extends BaseManager {
return ks;
}
- private boolean isPublicIpAddress(String ip) {
- return !(ip.equals("127.0.0.1") || ip.equals("0.0.0.0") || ip.equals(""));
- }
-
/**
* Finds the profile which is a best fit.
* @param clientIpIn IpAddress to search ip ranges for
diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java
index ca44b42..9a56201 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java
@@ -110,6 +110,7 @@ public class KickstartScheduleCommand extends BaseSystemOperation {
private static Logger log = Logger.getLogger(KickstartScheduleCommand.class);
public static final String DHCP_NETWORK_TYPE = "dhcp";
+ public static final String LINK_NETWORK_TYPE = "link";
public static final String STATIC_NETWORK_TYPE = "static";
// up2date is required to be 2.9.0
public static final String UP2DATE_VERSION = "2.9.0";
@@ -576,9 +577,7 @@ public class KickstartScheduleCommand extends BaseSystemOperation {
cmd.setKernelOptions(getExtraOptions());
cmd.setPostKernelOptions(postKernelOptions);
cmd.setScheduledAction(kickstartAction);
- if (!isDhcp) {
- cmd.setStaticNetwork(networkInterface);
- }
+ cmd.setNetworkInfo(isDhcp, networkInterface);
ValidatorError cobblerError = cmd.store();
if (cobblerError != null) {
return cobblerError;
@@ -592,9 +591,7 @@ public class KickstartScheduleCommand extends BaseSystemOperation {
cmd.setKernelOptions(kernelOptions);
cmd.setPostKernelOptions(postKernelOptions);
cmd.setScheduledAction(kickstartAction);
- if (!isDhcp) {
- cmd.setStaticNetwork(networkInterface);
- }
+ cmd.setNetworkInfo(isDhcp, networkInterface);
ValidatorError cobblerError = cmd.store();
if (cobblerError != null) {
return cobblerError;
@@ -947,7 +944,7 @@ public class KickstartScheduleCommand extends BaseSystemOperation {
static:146.108.30.184, static:auto, static:eth0
*/
if (!StringUtils.isBlank(networkInterface)) {
- if (isDhcp) {
+ if (isDhcp && !LINK_NETWORK_TYPE.equals(networkInterface)) {
// Get rid of the dhcp:
String params = " ksdevice=" + networkInterface;
if (!kOptions.contains("ksdevice")) {
@@ -1392,12 +1389,19 @@ public class KickstartScheduleCommand extends BaseSystemOperation {
}
/**
- * @param dhcp true if this is a dc
+ * @param networkType dhcp/static/link one of em.
* @param networkInterfaceIn The staticDevice to set.
*/
- public void setNetworkDevice(boolean dhcp, String networkInterfaceIn) {
- isDhcp = dhcp;
- networkInterface = networkInterfaceIn;
+ public void setNetworkDevice(String networkType, String networkInterfaceIn) {
+ isDhcp = networkType.equals(DHCP_NETWORK_TYPE) ||
+ networkType.equals(LINK_NETWORK_TYPE);
+ if (networkType.equals(LINK_NETWORK_TYPE)) {
+ networkInterface = LINK_NETWORK_TYPE;
+ }
+ else {
+ networkInterface = networkInterfaceIn;
+ }
+
}
/**
diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/SSMScheduleCommand.java b/java/code/src/com/redhat/rhn/manager/kickstart/SSMScheduleCommand.java
index d14e1d0..90e4a4a 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/SSMScheduleCommand.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/SSMScheduleCommand.java
@@ -53,7 +53,7 @@ public class SSMScheduleCommand {
private Long serverProfileId;
private Server proxy;
- private boolean isDhcp = true;
+ private String networkType;
private String networkInterface;
private List<Action> scheduledActions = new ArrayList<Action>();
private String kernelParamType;
@@ -208,7 +208,7 @@ public class SSMScheduleCommand {
com.setProfileId(packageProfileId);
com.setServerProfileId(serverProfileId);
com.setProxy(proxy);
- com.setNetworkDevice(isDhcp, networkInterface);
+ com.setNetworkDevice(networkType, networkInterface);
if (proxy == null) {
com.setKickstartServerName(ConfigDefaults.get().getCobblerHost());
}
@@ -264,11 +264,11 @@ public class SSMScheduleCommand {
}
/**
- * @param dhcp true if this is a dc
- * @param networkInterfaceIn The staticDevice to set.
+ * @param networkTypeIn could be one of dhcp, static or links
+ * @param networkInterfaceIn The network interface to set.
*/
- public void setNetworkDevice(boolean dhcp, String networkInterfaceIn) {
- isDhcp = dhcp;
+ public void setNetworkDevice(String networkTypeIn, String networkInterfaceIn) {
+ networkType = networkTypeIn;
networkInterface = networkInterfaceIn;
}
diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/cobbler/CobblerSystemCreateCommand.java b/java/code/src/com/redhat/rhn/manager/kickstart/cobbler/CobblerSystemCreateCommand.java
index 09ad45d..8d48ca8 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/cobbler/CobblerSystemCreateCommand.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/cobbler/CobblerSystemCreateCommand.java
@@ -23,15 +23,17 @@ import com.redhat.rhn.domain.token.ActivationKey;
import com.redhat.rhn.domain.token.ActivationKeyFactory;
import com.redhat.rhn.domain.token.Token;
import com.redhat.rhn.domain.user.User;
+import com.redhat.rhn.manager.kickstart.KickstartFormatter;
import com.redhat.rhn.manager.kickstart.KickstartUrlHelper;
import com.redhat.rhn.manager.token.ActivationKeyManager;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
+import org.cobbler.Network;
+import org.cobbler.Profile;
import org.cobbler.SystemRecord;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
@@ -55,13 +57,15 @@ public class CobblerSystemCreateCommand extends CobblerCommand {
private String kickstartHost;
private String kernelOptions;
private String postKernelOptions;
- private String staticNetwork;
-
+ private String networkInterface;
+ private boolean isDhcp;
/**
- * @param staticNetworkIn The staticNetwork to set.
+ * @param dhcp true if the network type is dhcp
+ * @param networkInterfaceIn The name of the network interface
*/
- public void setStaticNetwork(String staticNetworkIn) {
- staticNetwork = staticNetworkIn;
+ public void setNetworkInfo(boolean dhcp, String networkInterfaceIn) {
+ isDhcp = dhcp;
+ networkInterface = networkInterfaceIn;
}
/**
@@ -132,25 +136,29 @@ public class CobblerSystemCreateCommand extends CobblerCommand {
profileName = nameIn;
}
- protected String lookupExisting() {
- String sysname = null;
+ protected SystemRecord lookupExisting() {
if (server.getCobblerId() != null) {
SystemRecord rec;
rec = SystemRecord.lookupById(CobblerXMLRPCHelper.getConnection(user),
server.getCobblerId());
if (rec != null) {
- sysname = rec.getName();
+ return rec;
}
}
//lookup by ID failed, so lets try by mac
- if (sysname == null) {
- Map sysmap = getSystemMapByMac();
- if (sysmap != null) {
- log.debug("getSystemHandleByMAC.found match.");
- sysname = (String) sysmap.get("name");
+
+ Map sysmap = getSystemMapByMac();
+ if (sysmap != null) {
+ log.debug("getSystemHandleByMAC.found match.");
+ String uid = (String) sysmap.get("uid");
+ SystemRecord rec;
+ rec = SystemRecord.lookupById(CobblerXMLRPCHelper.getConnection(user),
+ server.getCobblerId());
+ if (rec != null) {
+ return rec;
}
}
- return sysname;
+ return null;
}
private Map getSystemMapByMac() {
@@ -193,7 +201,6 @@ public class CobblerSystemCreateCommand extends CobblerCommand {
}
}
return null;
-
}
@@ -202,61 +209,44 @@ public class CobblerSystemCreateCommand extends CobblerCommand {
* @return ValidatorError if the store failed.
*/
public ValidatorError store() {
+ Profile profile = Profile.lookupByName(getCobblerConnection(), profileName);
// First lookup by MAC addr
- String sysName = lookupExisting();
- if (sysName == null) {
+ SystemRecord rec = lookupExisting();
+ if (rec == null) {
// Next try by name
- try {
- String handle = (String) invokeXMLRPC("get_system_handle",
- getCobblerSystemRecordName(), xmlRpcToken);
- if (!StringUtils.isBlank(handle)) {
- sysName = getCobblerSystemRecordName();
- }
- log.debug("Did we find handle by name: " + handle);
- }
- catch (RuntimeException e) {
- log.debug("No system by that name either. create a new one");
- }
- }
- if (!StringUtils.isBlank(sysName)) {
- invokeXMLRPC("remove_system", sysName, xmlRpcToken);
- invokeCobblerUpdate();
+ rec = SystemRecord.lookupByName(getCobblerConnection(user),
+ getCobblerSystemRecordName());
}
- String handle = (String) invokeXMLRPC("new_system", xmlRpcToken);
- log.debug("handle: " + handle);
- invokeXMLRPC("modify_system", handle, "name", getCobblerSystemRecordName(),
- xmlRpcToken);
- if (this.server.getNetworkInterfaces() != null &&
- !this.server.getNetworkInterfaces().isEmpty()) {
- processNetworkInterfaces(handle, xmlRpcToken, server);
+ // Else, lets make a new system
+ if (rec == null) {
+ rec = SystemRecord.create(getCobblerConnection(),
+ getCobblerSystemRecordName(),
+ profile);
}
-
- Object[] args = new String[]{handle, "profile",
- profileName, xmlRpcToken};
- invokeXMLRPC("modify_system", Arrays.asList(args));
+ processNetworkInterfaces(rec, server);
+ rec.setProfile(profile);
if (this.activationKeys == null || this.activationKeys.length() == 0) {
log.error("This cobbler profile does not " +
"have a redhat_management_key set ");
}
else {
- invokeXMLRPC("modify_system", handle, "redhat_management_key",
- this.activationKeys, xmlRpcToken);
+ rec.setRedHatManagementKey(activationKeys);
}
-
-
if (!StringUtils.isBlank(getKickstartHost())) {
- invokeXMLRPC("modify_system", handle, "server",
- getKickstartHost(), xmlRpcToken);
+ rec.setServer(getKickstartHost());
}
else {
- invokeXMLRPC("modify_system", handle, "server",
- "", xmlRpcToken);
+ rec.setServer("");
}
// Setup the kickstart metadata so the URLs and activation key are setup
- Map ksmeta = new HashMap();
+ Map<String, Object> ksmeta = rec.getKsMeta();
+ if (ksmeta == null) {
+ ksmeta = new HashMap<String, Object>();
+ }
+
if (!StringUtils.isBlank(mediaPath)) {
ksmeta.put(KickstartUrlHelper.COBBLER_MEDIA_VARIABLE,
this.mediaPath);
@@ -265,35 +255,14 @@ public class CobblerSystemCreateCommand extends CobblerCommand {
ksmeta.put(SystemRecord.REDHAT_MGMT_SERVER,
getKickstartHost());
}
-
- args = new Object[]{handle, "ksmeta",
- ksmeta, xmlRpcToken};
- invokeXMLRPC("modify_system", Arrays.asList(args));
-
- invokeXMLRPC("save_system", handle, xmlRpcToken);
- Map cSystem = getSystemMapByMac();
- // Virt system records have no mac/interfaces setup so we search on name
- if (cSystem == null) {
- cSystem = getSystemMapByName();
- }
- server.setCobblerId((String)cSystem.get("uid"));
- SystemRecord record = SystemRecord.lookupById(getCobblerConnection(),
- server.getCobblerId());
- record.setKernelOptions(kernelOptions);
- record.setKernelPostOptions(postKernelOptions);
-
- record.save();
+ ksmeta.remove(KickstartFormatter.STATIC_NETWORK_VAR);
+ rec.setKsMeta(ksmeta);
+ rec.setKernelOptions(kernelOptions);
+ rec.setKernelPostOptions(postKernelOptions);
+ rec.save();
+ server.setCobblerId(rec.getId());
return null;
}
-
- private Map getSystemMapByName() {
- List < String > args = new ArrayList();
- args.add(getCobblerSystemRecordName());
- args.add(xmlRpcToken);
- Map retval = (Map) invokeXMLRPC("get_system", args);
- return retval;
- }
-
/**
* Get the cobbler system record name for this system.
* @return String name of cobbler system record.
@@ -304,30 +273,25 @@ public class CobblerSystemCreateCommand extends CobblerCommand {
this.server.getOrg().getId();
}
- protected void processNetworkInterfaces(String handleIn,
- String xmlRpcTokenIn,
- Server serverIn) {
- Map inet = new HashMap();
- for (NetworkInterface n : serverIn.getNetworkInterfaces()) {
- if (n.isValid()) {
- inet.put("macaddress-" + n.getName(), n.getHwaddr());
- if (!StringUtils.isBlank(n.getIpaddr())) {
- inet.put("ipaddress-" + n.getName(), n.getIpaddr());
+ protected void processNetworkInterfaces(SystemRecord rec,
+ Server serverIn) {
+ List <Network> nics = new LinkedList<Network>();
+ if (serverIn.getNetworkInterfaces() != null) {
+ for (NetworkInterface n : serverIn.getNetworkInterfaces()) {
+ if (n.isPublic()) {
+ Network net = new Network(n.getName());
+ net.setIpAddress(n.getIpaddr());
+ net.setMacAddress(n.getHwaddr());
+ net.setNetmask(n.getNetmask());
+ if (!StringUtils.isBlank(networkInterface) &&
+ n.getName().equals(networkInterface)) {
+ net.setStaticNetwork(!isDhcp);
+ }
+ nics.add(net);
}
- if (!StringUtils.isBlank(n.getNetmask())) {
- inet.put("subnet-" + n.getName(), n.getNetmask());
- }
- inet.put("static-" + n.getName(),
- !StringUtils.isBlank(staticNetwork) &&
- n.getName().equals(staticNetwork));
}
}
- log.debug("Networks: " + inet);
-
- Object[] args = new Object[]{handleIn, "modify-interface",
- inet, xmlRpcTokenIn};
- invokeXMLRPC("modify_system", Arrays.asList(args));
-
+ rec.setNetworkInterfaces(nics);
}
/**
diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/cobbler/CobblerVirtualSystemCommand.java b/java/code/src/com/redhat/rhn/manager/kickstart/cobbler/CobblerVirtualSystemCommand.java
index 0c265ae..825bd2f 100644
--- a/java/code/src/com/redhat/rhn/manager/kickstart/cobbler/CobblerVirtualSystemCommand.java
+++ b/java/code/src/com/redhat/rhn/manager/kickstart/cobbler/CobblerVirtualSystemCommand.java
@@ -22,12 +22,12 @@ import com.redhat.rhn.domain.server.Server;
import com.redhat.rhn.domain.user.User;
import org.apache.log4j.Logger;
+import org.cobbler.Network;
import org.cobbler.SystemRecord;
-import java.util.Arrays;
import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
+import java.util.LinkedList;
+import java.util.List;
/**
@@ -95,21 +95,18 @@ public class CobblerVirtualSystemCommand extends CobblerSystemCreateCommand {
}
@Override
- protected void processNetworkInterfaces(String handleIn,
- String xmlRpcTokenIn, Server serverIn) {
+ protected void processNetworkInterfaces(SystemRecord rec, Server serverIn) {
log.debug("processNetworkInterfaces called.");
-
String newMac = (String) invokeXMLRPC("get_random_mac", Collections.EMPTY_LIST);
- Map inet = new HashMap();
- inet.put("macaddress-" + "eth0", newMac);
-
- Object[] args = new Object[]{handleIn, "modify-interface",
- inet, xmlRpcTokenIn};
- invokeXMLRPC("modify_system", Arrays.asList(args));
+ Network net = new Network("eth0");
+ net.setMacAddress(newMac);
+ List<Network> nics = new LinkedList<Network>();
+ nics.add(net);
+ rec.setNetworkInterfaces(nics);
}
- protected String lookupExisting() {
+ protected SystemRecord lookupExisting() {
log.debug("lookupExisting called.");
SystemRecord rec = SystemRecord.lookupByName(
@@ -118,8 +115,7 @@ public class CobblerVirtualSystemCommand extends CobblerSystemCreateCommand {
return null;
}
else {
- return (String) invokeXMLRPC("get_system_handle",
- rec.getName(), xmlRpcToken);
+ return rec;
}
}
diff --git a/java/code/src/org/cobbler/Network.java b/java/code/src/org/cobbler/Network.java
new file mode 100644
index 0000000..40e971a
--- /dev/null
+++ b/java/code/src/org/cobbler/Network.java
@@ -0,0 +1,149 @@
+/**
+ * Copyright (c) 2009 Red Hat, Inc.
+ *
+ * This software is licensed to you under the GNU General Public License,
+ * version 2 (GPLv2). There is NO WARRANTY for this software, express or
+ * implied, including the implied warranties of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
+ * along with this software; if not, see
+ * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+ *
+ * Red Hat trademarks are not licensed under GPLv2. No permission is
+ * granted to use or replicate Red Hat trademarks that are incorporated
+ * in this software or its documentation.
+ */
+package org.cobbler;
+
+import org.apache.commons.lang.StringUtils;
+
+import java.util.HashMap;
+import java.util.Map;
+
+
+/**
+ * Network
+ * @version $Rev$
+ */
+public class Network {
+ private static final String SUBNET = "subnet";
+ private static final String DNS_NAME = "dns_name";
+ private static final String IP_ADDRESS = "ip_address";
+ private static final String STATIC = "static";
+ private static final String MAC_ADDRESS = "mac_address";
+
+ private String name;
+ private String subnet;
+ private String ipAddress;
+ private boolean isStatic;
+ private String macAddress;
+ /**
+ * Constructor to create a new network interface
+ * @param nameIn the name of the network
+ */
+ public Network(String nameIn) {
+ name = nameIn;
+ }
+
+ /**
+ * Intentionally given default/package scope
+ * returns a nicely formatted map that can be used by
+ * the system record to set it in xmlrpc.
+ * @return a map representation of the interface
+ */
+ Map<String, Object> toMap() {
+ Map<String, Object> inet = new HashMap<String, Object>();
+ addToMap(inet, "macaddress-" + name, macAddress);
+ addToMap(inet, "subnet-" + name, subnet);
+ addToMap(inet, "ipaddress-" + name, ipAddress);
+ addToMap(inet, "macaddress-" + name, macAddress);
+ addToMap(inet, "static-" + name, isStatic);
+ return inet;
+ }
+
+ private void addToMap(Map<String, Object> inet, String key, Object value) {
+ if (value != null || (value instanceof String &&
+ !StringUtils.isBlank((String)value))) {
+ inet.put(key, value);
+ }
+ }
+
+ /**
+ * Given a interface name and map generated by the system record
+ * this method creates a new Network object.
+ * @param name the name of the interface
+ * @param ifaceInfo the interface information
+ * @return the netwrok object
+ */
+ static Network load(String name, Map<String, Object> ifaceInfo) {
+ Network net = new Network(name);
+ net.setMacAddress((String)ifaceInfo.get(MAC_ADDRESS));
+ net.setNetmask((String)ifaceInfo.get(SUBNET));
+ net.setIpAddress((String)ifaceInfo.get(IP_ADDRESS));
+ net.setStaticNetwork(ifaceInfo.containsKey(STATIC) &&
+ Boolean.TRUE.equals(ifaceInfo.get(STATIC)));
+ return net;
+ }
+
+ /**
+ * @return Returns the name.
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @return Returns the subnet.
+ */
+ public String getSubnet() {
+ return subnet;
+ }
+
+ /**
+ * @param subnetIn The subnet to set.
+ */
+ public void setNetmask(String subnetIn) {
+ subnet = subnetIn;
+ }
+
+ /**
+ * @return Returns the ipAddress.
+ */
+ public String getIpAddress() {
+ return ipAddress;
+ }
+
+ /**
+ * @param ipAddressIn The ipAddress to set.
+ */
+ public void setIpAddress(String ipAddressIn) {
+ ipAddress = ipAddressIn;
+ }
+
+ /**
+ * @return Returns the isStatic.
+ */
+ public boolean isStaticNetwork() {
+ return isStatic;
+ }
+
+ /**
+ * @param staticIn The isStatic to set.
+ */
+ public void setStaticNetwork(boolean staticIn) {
+ isStatic = staticIn;
+ }
+
+ /**
+ * @return Returns the macAddress.
+ */
+ public String getMacAddress() {
+ return macAddress;
+ }
+
+ /**
+ * @param macAddressIn The macAddress to set.
+ */
+ public void setMacAddress(String macAddressIn) {
+ macAddress = macAddressIn;
+ }
+}
diff --git a/java/code/src/org/cobbler/SystemRecord.java b/java/code/src/org/cobbler/SystemRecord.java
index 234ad40..8448735 100644
--- a/java/code/src/org/cobbler/SystemRecord.java
+++ b/java/code/src/org/cobbler/SystemRecord.java
@@ -16,6 +16,7 @@
package org.cobbler;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
@@ -31,6 +32,7 @@ public class SystemRecord extends CobblerObject {
private static final String NAME_SERVERS = "name_servers";
private static final String GATEWAY = "gateway";
private static final String PROFILE = "profile";
+ private static final String SERVER = "server";
private static final String VIRT_BRIDGE = "virt_bridge";
private static final String VIRT_CPUS = "virt_cpus";
private static final String VIRT_TYPE = "virt_type";
@@ -39,6 +41,8 @@ public class SystemRecord extends CobblerObject {
private static final String VIRT_RAM = "virt_ram";
private static final String NETBOOT_ENABLED = "netboot_enabled";
public static final String REDHAT_MGMT_SERVER = "redhat_management_server";
+ private static final String SET_INTERFACES = "modify-interface";
+ private static final String GET_INTERFACES = "interface";
private SystemRecord(CobblerConnection clientIn) {
client = clientIn;
@@ -48,13 +52,16 @@ public class SystemRecord extends CobblerObject {
* Create a new system record in cobbler
* @param client the xmlrpc client
* @param name the system record name
+ * @param profile the profile to be associated to this system
* @return the newly created system record
*/
public static SystemRecord create(CobblerConnection client,
- String name) {
+ String name,
+ Profile profile) {
SystemRecord sys = new SystemRecord(client);
sys.handle = (String) client.invokeTokenMethod("new_system");
sys.modify(NAME, name);
+ sys.setProfile(profile);
sys.save();
sys = lookupByName(client, name);
return sys;
@@ -199,8 +206,8 @@ public class SystemRecord extends CobblerObject {
/**
* @return the Cobbler Profile name
*/
- public String getProfile() {
- return (String)dataMap.get(PROFILE);
+ public Profile getProfile() {
+ return Profile.lookupByName(client, (String)dataMap.get(PROFILE));
}
/**
@@ -244,6 +251,7 @@ public class SystemRecord extends CobblerObject {
public int getVirtRam() {
return (Integer)dataMap.get(VIRT_RAM);
}
+
/**
* true if netboot enabled is true
* false other wise
@@ -323,4 +331,56 @@ public class SystemRecord extends CobblerObject {
public void setHostName(String hostname) {
modify(HOSTNAME, hostname);
}
+
+ /**
+ * Associates a profile to this system record
+ * @param profile the profile to associate
+ */
+ public void setProfile(Profile profile) {
+ setProfile(profile.getName());
+ }
+
+ /**
+ * Associates a profile to this system record
+ * @param profileName the name of the profile
+ */
+ public void setProfile(String profileName) {
+ modify(PROFILE, profileName);
+ }
+
+ /**
+ * Sets the cobbler server host information for this system
+ * @param server the server host name.
+ */
+ public void setServer(String server) {
+ modify(SERVER, server);
+ }
+
+ /**
+ * Sets the network interfaces available to this system
+ * @param interfaces a list of network interfaces
+ */
+ public void setNetworkInterfaces(List<Network> interfaces) {
+ Map<String, Object> ifaces = new HashMap<String, Object>();
+ for (Network net : interfaces) {
+ ifaces.putAll(net.toMap());
+ }
+ modify(SET_INTERFACES, ifaces);
+ }
+
+ /**
+ * @return a list of network interfaces associated to this system
+ */
+ public List<Network> getNetworkInterfaces() {
+ reload();
+ List<Network> networks = new LinkedList<Network>();
+ Map<String, Map<String, Object>> interfaces = (Map<String, Map<String, Object>>)
+ dataMap.get(GET_INTERFACES);
+ if (interfaces != null) {
+ for (String name : interfaces.keySet()) {
+ networks.add(Network.load(name, interfaces.get(name)));
+ }
+ }
+ return networks;
+ }
}
diff --git a/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/schedule/advanced.jspf b/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/schedule/advanced.jspf
index 8bbc685..f893301 100644
--- a/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/schedule/advanced.jspf
+++ b/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/schedule/advanced.jspf
@@ -27,6 +27,9 @@ function setStep(stepName) {
<h2><img src="/img/icon_kickstart_session-medium.gif" /><bean:message key="kickstart.schedule.heading4.jsp" /></h2>
<c:set var="form" value="${kickstartScheduleWizardForm.map}"/>
<html:form method="POST" action="${actionUrl}" styleId="wizard-form">
+<c:if test="${empty regularKS}">
+ <c:set var="noStatic" value="true"/>
+</c:if>
<html:hidden property="wizardStep" value="third" styleId="wizard-step" />
<html:hidden property="scheduleAsap" />
<html:hidden property="date_year" />
@@ -40,9 +43,7 @@ function setStep(stepName) {
<html:hidden property="guestName" />
<html:hidden property="proxyHost" />
<table class="details">
- <c:if test="${not empty regularKS}">
- <%@ include file="/WEB-INF/pages/common/fragments/kickstart/schedule/network-options.jspf" %>
- </c:if>
+ <%@ include file="/WEB-INF/pages/common/fragments/kickstart/schedule/network-options.jspf" %>
<%@ include file="/WEB-INF/pages/common/fragments/kickstart/schedule/kernel-options.jspf" %>
<c:if test="${empty requestScope.cobblerOnlyProfile}" >
<%@ include file="/WEB-INF/pages/common/fragments/kickstart/schedule/profile-sync.jspf" %>
diff --git a/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/schedule/ks-wizard.jspf b/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/schedule/ks-wizard.jspf
index 544f130..0a61892 100644
--- a/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/schedule/ks-wizard.jspf
+++ b/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/schedule/ks-wizard.jspf
@@ -11,7 +11,7 @@
<input type="hidden" name="kernelParamsType" value="${form.kernelParamsType}" />
<input type="hidden" name="kernelParams" value="${form.kernelParams}" />
- <input type="hidden" name="networkTypeDhcp" value="${form.networkTypeDhcp}" />
+ <input type="hidden" name="networkType" value="${form.networkType}" />
<input type="hidden" name="networkInterface" value="${form.networkInterface}" />
<!-- Store useful id fields-->
diff --git a/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/schedule/network-options.jspf b/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/schedule/network-options.jspf
index c2cca49..23c2458 100644
--- a/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/schedule/network-options.jspf
+++ b/java/code/webapp/WEB-INF/pages/common/fragments/kickstart/schedule/network-options.jspf
@@ -5,22 +5,22 @@
<tr>
<th><bean:message key="kickstart.netconn.jsp.label" />:</th>
<td>
- <input type="radio" name="networkTypeDhcp" value="true"
+ <input type="radio" name="networkType" value="dhcp"
onclick="form.dhcpNetworkId.disabled = false; form.staticNetworkId.disabled = true;"
- <c:if test="${form.networkTypeDhcp or empty form.networkTypeDhcp}">checked="checked"</c:if>
+ <c:if test="${form.networkType == 'dhcp'}">checked="checked"</c:if>
/>
<bean:message key="kickstart.netconn.dhcp.jsp.label"/>
<c:choose>
- <c:when test="${empty requestScope.dhcpNetworkInterfaces}">
+ <c:when test="${empty requestScope.networkInterfaces}">
<input type="text" name="networkInterface" id="dhcpNetworkId" size="4" maxlength="10"
- <c:if test="${not form.networkTypeDhcp}">disabled="true"</c:if>
+ <c:if test="${form.networkType ne 'dhcp'}">disabled="true"</c:if>
value="${form.networkInterface}"/>
</c:when>
<c:otherwise>
<select name="networkInterface" id="dhcpNetworkId"
- <c:if test="${not form.networkTypeDhcp}">disabled="true"</c:if>
+ <c:if test="${form.networkType ne 'dhcp'}">disabled="true"</c:if>
>
- <c:forEach var="nic" items="${requestScope.dhcpNetworkInterfaces}">
+ <c:forEach var="nic" items="${requestScope.networkInterfaces}">
<option
<c:if test="${nic.name == form.networkInterface}">selected="selected"</c:if>
value='${nic.name}'>${nic.name}</option>
@@ -29,22 +29,23 @@
</c:otherwise>
</c:choose>
<br />
- <input type="radio" name="networkTypeDhcp" value="false"
+ <c:if test="${empty noStatic}">
+ <input type="radio" name="networkType" value="static"
onclick="form.staticNetworkId.disabled = false;form.dhcpNetworkId.disabled = true;"
- <c:if test="${not form.networkTypeDhcp}">checked="checked"</c:if>
+ <c:if test="${not form.networkType}">checked="checked"</c:if>
/>
<bean:message key="kickstart.netconn.static.jsp.label"/>
<c:choose>
- <c:when test="${empty requestScope.staticNetworkInterfaces}">
+ <c:when test="${empty requestScope.networkInterfaces}">
<input type="text" name="networkInterface" id="staticNetworkId" size="4" maxlength="10"
- <c:if test="${form.networkTypeDhcp}">disabled="true"</c:if>
+ <c:if test="${form.networkType ne 'static'}">disabled="true"</c:if>
value="${form.networkInterface}"/>
</c:when>
<c:otherwise>
<select name="networkInterface" id="staticNetworkId"
- <c:if test="${form.networkTypeDhcp}">disabled="true"</c:if>
+ <c:if test="${form.networkType ne 'static'}">disabled="true"</c:if>
>
- <c:forEach var="nic" items="${requestScope.staticNetworkInterfaces}">
+ <c:forEach var="nic" items="${requestScope.networkInterfaces}">
<option
<c:if test="${nic.name == form.networkInterface}">selected="selected"</c:if>
value='${nic.name}'>${nic.name}</option>
@@ -52,5 +53,12 @@
</select>
</c:otherwise>
</c:choose>
+ <br />
+ </c:if>
+ <input type="radio" name="networkType" value="link"
+ onclick="form.staticNetworkId.disabled = true;form.dhcpNetworkId.disabled = true;"
+ <c:if test="${form.networkType == 'link' or empty form.networkType}">checked="checked"</c:if>
+ />
+ <bean:message key="kickstart.netconn.dhcp.jsp.link"/>
</td>
</tr>
diff --git a/java/code/webapp/WEB-INF/struts-config.xml b/java/code/webapp/WEB-INF/struts-config.xml
index daa9e20..7a26013 100644
--- a/java/code/webapp/WEB-INF/struts-config.xml
+++ b/java/code/webapp/WEB-INF/struts-config.xml
@@ -728,7 +728,7 @@
<form-property name="nextAction" type="java.lang.String" />
<form-property name="proxyHost" type="java.lang.String" />
<!-- Advanced Options Page -->
- <form-property name="networkTypeDhcp" type="java.lang.Boolean" />
+ <form-property name="networkType" type="java.lang.String" />
<form-property name="networkInterface" type="java.lang.String" />
<form-property name="kernelParamsType" type="java.lang.String" />
<form-property name="kernelParams" type="java.lang.String" />
14 years, 9 months
Changes to 'refs/tags/spacewalk-config-0.6.13-1'
by Devan Goodwin
Tag 'spacewalk-config-0.6.13-1' created by Devan Goodwin <dgoodwin(a)redhat.com> at 2009-07-29 20:32 +0000
Tagging package [spacewalk-config] version [0.6.13-1] in directory [spacewalk/config/].
Changes since spacewalk-backend-0.6.28-1:
Devan Goodwin (2):
Add router.xml and router-users.xml to jabberd configs we deploy.
Automatic commit of package [spacewalk-config] release [0.6.13-1].
---
rel-eng/packages/spacewalk-config | 2
spacewalk/config/etc/sysconfig/rhn-satellite-prep/etc/jabberd/router-users.xml | 11
spacewalk/config/etc/sysconfig/rhn-satellite-prep/etc/jabberd/router.xml | 201 ++++++++++
spacewalk/config/spacewalk-config.spec | 6
4 files changed, 218 insertions(+), 2 deletions(-)
---
14 years, 9 months
rel-eng/packages spacewalk/config
by Devan Goodwin
rel-eng/packages/spacewalk-config | 2 +-
spacewalk/config/spacewalk-config.spec | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 82881c93a05fccb71cd0660f8ad4bbf764688196
Author: Devan Goodwin <dgoodwin(a)redhat.com>
Date: Wed Jul 29 17:32:30 2009 -0300
Automatic commit of package [spacewalk-config] release [0.6.13-1].
diff --git a/rel-eng/packages/spacewalk-config b/rel-eng/packages/spacewalk-config
index c464613..d509530 100644
--- a/rel-eng/packages/spacewalk-config
+++ b/rel-eng/packages/spacewalk-config
@@ -1 +1 @@
-0.6.12-1 spacewalk/config/
+0.6.13-1 spacewalk/config/
diff --git a/spacewalk/config/spacewalk-config.spec b/spacewalk/config/spacewalk-config.spec
index e9640f5..e7e68b3 100644
--- a/spacewalk/config/spacewalk-config.spec
+++ b/spacewalk/config/spacewalk-config.spec
@@ -2,7 +2,7 @@
Name: spacewalk-config
Summary: Spacewalk Configuration
-Version: 0.6.12
+Version: 0.6.13
Release: 1%{?dist}
URL: http://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -98,6 +98,10 @@ EOF
%changelog
+* Wed Jul 29 2009 Devan Goodwin <dgoodwin(a)redhat.com> 0.6.13-1
+- Add router.xml and router-users.xml to jabberd configs we deploy.
+ (dgoodwin(a)redhat.com)
+
* Tue Jul 28 2009 Devan Goodwin <dgoodwin(a)redhat.com> 0.6.12-1
- Better jabberd password replacement for upgrades. (dgoodwin(a)redhat.com)
14 years, 9 months
spacewalk/config
by Devan Goodwin
spacewalk/config/etc/sysconfig/rhn-satellite-prep/etc/jabberd/router-users.xml | 11
spacewalk/config/etc/sysconfig/rhn-satellite-prep/etc/jabberd/router.xml | 201 ++++++++++
2 files changed, 212 insertions(+)
New commits:
commit bde805b5f1b7370572131ca0df1e4649c86d2c68
Author: Devan Goodwin <dgoodwin(a)redhat.com>
Date: Wed Jul 29 14:23:36 2009 -0300
Add router.xml and router-users.xml to jabberd configs we deploy.
These have <secret> which we must also replace when deploying.
diff --git a/spacewalk/config/etc/sysconfig/rhn-satellite-prep/etc/jabberd/router-users.xml b/spacewalk/config/etc/sysconfig/rhn-satellite-prep/etc/jabberd/router-users.xml
new file mode 100644
index 0000000..d8da574
--- /dev/null
+++ b/spacewalk/config/etc/sysconfig/rhn-satellite-prep/etc/jabberd/router-users.xml
@@ -0,0 +1,11 @@
+<!-- This is the list of known router users, and their authentication
+ secrets. Access control is done via the settings in router.xml -->
+<users>
+ <user>
+ <name>jabberd</name>
+ <secret>@@jabberDOTdbpass@@</secret>
+ </user>
+</users>
+<!--
+ vim: syntax=xml
+-->
diff --git a/spacewalk/config/etc/sysconfig/rhn-satellite-prep/etc/jabberd/router.xml b/spacewalk/config/etc/sysconfig/rhn-satellite-prep/etc/jabberd/router.xml
new file mode 100644
index 0000000..fa0a305
--- /dev/null
+++ b/spacewalk/config/etc/sysconfig/rhn-satellite-prep/etc/jabberd/router.xml
@@ -0,0 +1,201 @@
+<!-- Router configuration -->
+<router>
+ <!-- ID of the router on the network (default: router) -->
+ <id>router</id>
+
+ <!-- The process ID file. Comment this out if you don't need to know
+ the process ID from outside the process (eg for control scripts) -->
+ <pidfile>/var/lib/jabberd/pid/router.pid</pidfile>
+
+ <!-- Log configuration - type is "syslog", "file" or "stdout" -->
+ <log type='syslog'>
+ <!-- If logging to syslog, this is the log ident -->
+ <ident>jabberd/router</ident>
+
+ <!-- If logging to syslog, this is the log facility
+ (local0 - local7) [default: local3] -->
+ <facility>local3</facility>
+
+ <!-- If logging to file, this is the filename of the logfile -->
+ <!--
+ <file>/var/lib/jabberd/log/router.log</file>
+ -->
+ </log>
+
+ <!-- Local network configuration -->
+ <local>
+ <!-- IP address to bind to (default: 0.0.0.0) -->
+ <ip>0.0.0.0</ip>
+
+ <!-- Port to bind to (default: 5347) -->
+ <port>5347</port>
+
+ <!-- File containing the user table. This is where the router gets
+ its component and secret information from for component
+ authentication.-->
+ <users>/etc/jabberd/router-users.xml</users>
+
+ <!-- Shared secret used to identify XEP-0114 components (that is,
+ "jabber:component:accept" components that authenticate using
+ the Jabber Component Protocol's "handshake", for example
+ mu-conference). If this is commented out, support for XEP-0114
+ components will be disabled. -->
+ <secret>@@jabberDOTdbpass@@</secret>
+
+ <!-- File containing an SSL certificate and private key for client
+ connections. From SSL_CTX_use_certificate_chain_file(3):
+ "The certificates must be in PEM format and must be sorted
+ starting with the subject's certificate (actual client or
+ server certificate), followed by intermediate CA certificates
+ if applicable, and ending at the highest level (root) CA"
+ (the latter one being optional).
+ If this is commented out, connecting components will not be able
+ to request an SSL-encrypted channel. -->
+ <!--
+ <pemfile>/etc/jabberd/server.pem</pemfile>
+ -->
+ </local>
+
+ <!-- Timed checks -->
+ <check>
+ <!-- Interval between checks.
+
+ Checks will be run every n seconds.
+
+ 0 disables all checks. (default: 60) -->
+ <interval>60</interval>
+
+ <!-- Keepalives.
+ Connections that have not been used for longer than
+ this many seconds will have a single whitespace character sent
+ to them. This will force the TCP connection to be closed if
+ they have disconnected without us knowing about it.
+ 0 disables keepalives. (default: 0) -->
+ <keepalive>0</keepalive>
+
+ </check>
+
+ <!-- input/output settings -->
+ <io>
+ <!-- Maximum number of file descriptors. Note that the number of
+ possible connections will be slightly less than this, because
+ the router itself can use up four on its own. If the supply of
+ file descriptors is exhausted, new incoming connections will be
+ denied.
+
+ These file descriptors are really only used when a component
+ connects to the router. So unless you have a lot of components
+ for some reason then you probably don't need to change this
+ value.
+
+ (default: 1024) -->
+ <max_fds>1024</max_fds>
+
+ <!-- Rate limiting -->
+ <limits>
+ <!-- Maximum bytes per second - if more than X bytes are sent in Y
+ seconds, connection is throttled for Z seconds. The format
+ is:
+
+ <bytes seconds='Y' throttle='Z'>X</bytes>
+
+ Default Y is 1, default Z is 5. set X to 0 to disable. -->
+ <bytes>0</bytes>
+
+ <!-- Maximum connects per second - if more than X connects are
+ attempted from a single IP in Y seconds, that IP is throttled
+ for Z seconds. The format is:
+
+ <connects seconds='Y' throttle='Z'>X</connects>
+
+ Default Y is 5, default Z is 5. set X to 0 to disable. -->
+ <connects>0</connects>
+ </limits>
+
+ <!-- IP-based access controls. If a connection IP matches an allow
+ rule, the connection will be accepted. If a connecting IP
+ matches a deny rule, the connection will be refused. If the
+ connecting IP does not match any rules, or it matches both an
+ allow and a deny rule, the contents of the <order/> option
+ determines what happens. -->
+ <access>
+ <!-- Rule check order (default: allow,deny)
+
+ allow,deny - Check allow rules, then check deny rules.
+ Allow by default.
+ deny,allow - Check deny rules, then check allow rules.
+ Deny by default. -->
+ <order>allow,deny</order>
+
+ <!-- Allow a network. If the mask isn't specified, it defaults to
+ 255.255.255.255 (ie allow onle the specified IP) -->
+ <!--
+ <allow ip='127.0.0.0' mask='255.0.0.0'/>
+ -->
+
+ <!-- Allow a single host -->
+ <!--
+ <allow ip='12.34.56.78'/>
+ -->
+
+ <!-- Deny a network or a host -->
+ <!--
+ <deny ip='127.0.0.1' mask='255.0.0.0'/>
+ <deny ip='87.65.43.21'/>
+ -->
+ </access>
+ </io>
+
+ <!-- Name aliases.
+
+ Packets destined for the domain specified in the "name" attribute
+ will be routed to the component that has currently bound the name
+ in the "target" attribute (assuming it is online).
+
+ This is usually only required for some kinds of legacy
+ components (particularly jabberd 1.4 "uplink" components) -->
+ <aliases>
+ <!-- Example for a MUC component running from a jabberd 1.4 uplink -->
+ <!--
+ <alias name='conference.domain.com' target='muclinker'/>
+ -->
+ </aliases>
+
+ <!-- Access control information -->
+ <aci>
+ <!-- The usernames listed here will get access to all restricted
+ functions, regardless of restrictions further down -->
+ <acl type='all'>
+ <user>jabberd</user>
+ </acl>
+
+ <!-- These users can bind names other than their username -->
+ <!--
+ <acl type='bind'>
+ </acl>
+ -->
+
+ <!-- These users can bind a name as a default route -->
+ <!--
+ <acl type='default-route'>
+ <user>s2s</user>
+ </acl>
+ -->
+
+ <!-- These users can elect to receive all packets that pass through the router -->
+ <!--
+ <acl type='log'>
+ <user>msglog</user>
+ </acl>
+ -->
+
+ <!-- File containing packet filter rules.
+ May be used for fine grained packet routing control. -->
+ <filter>/etc/jabberd/router-filter.xml</filter>
+
+ </aci>
+
+</router>
+<!--
+ vim: syntax=xml
+-->
14 years, 9 months
Changes to 'refs/tags/spacewalk-backend-0.6.28-1'
by Pradeep Kilambi
Tag 'spacewalk-backend-0.6.28-1' created by Pradeep Kilambi <pkilambi(a)redhat.com> at 2009-07-29 16:10 +0000
Tagging package [spacewalk-backend] version [0.6.28-1] in directory [backend/].
Changes since spacewalk-proxy-installer-0.6.21-1:
Pradeep Kilambi (1):
Automatic commit of package [spacewalk-backend] release [0.6.28-1].
---
backend/spacewalk-backend.spec | 5 ++++-
rel-eng/packages/spacewalk-backend | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
---
14 years, 9 months
backend/spacewalk-backend.spec rel-eng/packages
by Pradeep Kilambi
backend/spacewalk-backend.spec | 5 ++++-
rel-eng/packages/spacewalk-backend | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 6629800ddba1fcdacd137e39072ac229b931ce3d
Author: Pradeep Kilambi <pkilambi(a)redhat.com>
Date: Wed Jul 29 12:10:54 2009 -0400
Automatic commit of package [spacewalk-backend] release [0.6.28-1].
diff --git a/backend/spacewalk-backend.spec b/backend/spacewalk-backend.spec
index db57803..77196db 100644
--- a/backend/spacewalk-backend.spec
+++ b/backend/spacewalk-backend.spec
@@ -7,7 +7,7 @@ Name: spacewalk-backend
Summary: Common programs needed to be installed on the Spacewalk servers/proxies
Group: Applications/Internet
License: GPLv2
-Version: 0.6.27
+Version: 0.6.28
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -572,6 +572,9 @@ rm -f %{rhnconf}/rhnSecret.py*
# $Id$
%changelog
+* Wed Jul 29 2009 Pradeep Kilambi <pkilambi(a)redhat.com> 0.6.28-1
+-
+
* Mon Jul 27 2009 Devan Goodwin <dgoodwin(a)redhat.com> 0.6.27-1
- Fix rhnSQL pgsql driver when sql not provided to Cursor class.
(dgoodwin(a)redhat.com)
diff --git a/rel-eng/packages/spacewalk-backend b/rel-eng/packages/spacewalk-backend
index 14214bd..f5f347c 100644
--- a/rel-eng/packages/spacewalk-backend
+++ b/rel-eng/packages/spacewalk-backend
@@ -1 +1 @@
-0.6.27-1 backend/
+0.6.28-1 backend/
14 years, 9 months
Changes to 'refs/tags/spacewalk-proxy-installer-0.6.21-1'
by John Matthews
Tag 'spacewalk-proxy-installer-0.6.21-1' created by John Matthews <jmatthew(a)redhat.com> at 2009-07-29 14:54 +0000
Tagging package [spacewalk-proxy-installer] version [0.6.21-1] in directory [proxy/installer/].
Changes since spacewalk-schema-0.6.18-1:
John Matthews (1):
Automatic commit of package [spacewalk-proxy-installer] release [0.6.21-1].
---
proxy/installer/spacewalk-proxy-installer.spec | 6 +++++-
rel-eng/packages/spacewalk-proxy-installer | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
---
14 years, 9 months
proxy/installer rel-eng/packages
by John Matthews
proxy/installer/spacewalk-proxy-installer.spec | 6 +++++-
rel-eng/packages/spacewalk-proxy-installer | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 8b557015fbe3f55b4df205bee223e1b53081de5c
Author: John Matthews <jmatthew(a)redhat.com>
Date: Wed Jul 29 10:54:18 2009 -0400
Automatic commit of package [spacewalk-proxy-installer] release [0.6.21-1].
diff --git a/proxy/installer/spacewalk-proxy-installer.spec b/proxy/installer/spacewalk-proxy-installer.spec
index 0f99b78..bb323a9 100644
--- a/proxy/installer/spacewalk-proxy-installer.spec
+++ b/proxy/installer/spacewalk-proxy-installer.spec
@@ -2,7 +2,7 @@ Name: spacewalk-proxy-installer
Summary: Spacewalk Proxy Server Installer
Group: Applications/Internet
License: GPLv2
-Version: 0.6.20
+Version: 0.6.21
Release: 1%{?dist}
URL: https://fedorahosted.org/spacewalk
Source0: https://fedorahosted.org/releases/s/p/spacewalk/%{name}-%{version}.tar.gz
@@ -87,6 +87,10 @@ rm -rf $RPM_BUILD_ROOT
%doc LICENSE answers.txt
%changelog
+* Wed Jul 29 2009 John Matthews <jmatthew(a)redhat.com> 0.6.21-1
+- 493060 - do not send email "RHN Monitoring Scout started" by default
+ (msuchy(a)redhat.com)
+
* Mon Jul 20 2009 Miroslav Suchy <msuchy(a)redhat.com> 0.6.20-1
- 496615 - take up 1 as yes
diff --git a/rel-eng/packages/spacewalk-proxy-installer b/rel-eng/packages/spacewalk-proxy-installer
index ff91d33..b26a65c 100644
--- a/rel-eng/packages/spacewalk-proxy-installer
+++ b/rel-eng/packages/spacewalk-proxy-installer
@@ -1 +1 @@
-0.6.20-1 proxy/installer/
+0.6.21-1 proxy/installer/
14 years, 9 months
Changes to 'refs/tags/spacewalk-schema-0.6.18-1'
by John Matthews
Tag 'spacewalk-schema-0.6.18-1' created by John Matthews <jmatthew(a)redhat.com> at 2009-07-29 14:50 +0000
Tagging package [spacewalk-schema] version [0.6.18-1] in directory [schema/spacewalk/].
Changes since spacewalk-web-0.6.16-1:
John Matthews (1):
Automatic commit of package [spacewalk-schema] release [0.6.18-1].
---
rel-eng/packages/spacewalk-schema | 2 +-
schema/spacewalk/spacewalk-schema.spec | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
---
14 years, 9 months