diff --git a/java/Makefile.docker b/java/Makefile.docker
index 1f77681ed088..ff232bc54230 100644
--- a/java/Makefile.docker
+++ b/java/Makefile.docker
@@ -2,6 +2,7 @@
#
# Docker tests variables
+EXECUTOR = docker
DOCKER_CONTAINER_BASE = systemsmanagement/uyuni/master/docker/containers/uyuni-master
DOCKER_REGISTRY = registry.opensuse.org
DOCKER_VOLUMES = -v "$(CURDIR)/../:/manager"
@@ -14,8 +15,8 @@ DOCKER_ENV =
all :: dockerrun_pg
dockerpull ::
- docker pull $(DOCKER_REGISTRY)/$(DOCKER_CONTAINER_BASE)-pgsql-4eclipse
+ $(EXECUTOR) pull $(DOCKER_REGISTRY)/$(DOCKER_CONTAINER_BASE)-pgsql-4eclipse
dockerrun_pg ::
cp buildconf/test/rhn.conf.postgresql-example buildconf/test/rhn.conf
- docker run $(DOCKER_COMMON_OPTS) $(DOCKER_PG_PORTS) $(DOCKER_VOLUMES) $(DOCKER_ENV) $(DOCKER_REGISTRY)/$(DOCKER_CONTAINER_BASE)-pgsql-4eclipse
+ $(EXECUTOR) run $(DOCKER_COMMON_OPTS) $(DOCKER_PG_PORTS) $(DOCKER_VOLUMES) $(DOCKER_ENV) $(DOCKER_REGISTRY)/$(DOCKER_CONTAINER_BASE)-pgsql-4eclipse
diff --git a/java/buildconf/ivy/ivy-suse.xml b/java/buildconf/ivy/ivy-suse.xml
index c188144edb12..05c1cdd2f442 100644
--- a/java/buildconf/ivy/ivy-suse.xml
+++ b/java/buildconf/ivy/ivy-suse.xml
@@ -130,7 +130,7 @@
-
+
diff --git a/java/code/src/com/redhat/rhn/domain/kickstart/KickstartData.java b/java/code/src/com/redhat/rhn/domain/kickstart/KickstartData.java
index 417623ddcf49..db3367c7862c 100644
--- a/java/code/src/com/redhat/rhn/domain/kickstart/KickstartData.java
+++ b/java/code/src/com/redhat/rhn/domain/kickstart/KickstartData.java
@@ -1458,6 +1458,7 @@ public String getDefaultVirtBridge() {
* taskomatic.
* @return the Profile associated to this ks data
*/
+
public Profile getCobblerObject(User user) {
if (StringUtils.isBlank(getCobblerId())) {
return null;
diff --git a/java/code/src/com/redhat/rhn/domain/server/Server.java b/java/code/src/com/redhat/rhn/domain/server/Server.java
index ced882eb9fed..4b3dfdacfed5 100644
--- a/java/code/src/com/redhat/rhn/domain/server/Server.java
+++ b/java/code/src/com/redhat/rhn/domain/server/Server.java
@@ -727,6 +727,10 @@ public void setSecret(String secretIn) {
}
/**
+ * This may be null in some cases:
+ * - If a server was bootstrapped with Salt and the key was accepted manually via "salt-key".
+ * - If a server was created by a user and the user was later on deleted.
+ *
* @return Returns the creator.
*/
public User getCreator() {
diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java
index ac4097f40605..19ee89004ef5 100644
--- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java
+++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java
@@ -6585,6 +6585,10 @@ private KickstartData lookupKsData(String label, Org org) {
* @apidoc.returntype #return_int_success()
*/
public int createSystemRecord(User loggedInUser, Integer sid, String ksLabel) {
+ if (loggedInUser == null) {
+ throw new FaultException(-2, "loggedInUserNull", "The logged in user was null!");
+ }
+
Server server = null;
try {
server = SystemManager.lookupByIdAndUser(sid.longValue(),
@@ -6600,9 +6604,7 @@ public int createSystemRecord(User loggedInUser, Integer sid, String ksLabel) {
}
KickstartData ksData = lookupKsData(ksLabel, loggedInUser.getOrg());
- CobblerSystemCreateCommand cmd = new CobblerSystemCreateCommand(
- loggedInUser, ksData.getCobblerObject(loggedInUser).getName(),
- ksData, server.getName(), loggedInUser.getOrg().getId());
+ CobblerSystemCreateCommand cmd = new CobblerSystemCreateCommand(loggedInUser, ksData, server);
cmd.store();
return 1;
@@ -6637,6 +6639,10 @@ public int createSystemRecord(User loggedInUser, Integer sid, String ksLabel) {
*/
public int createSystemRecord(User loggedInUser, String systemName, String ksLabel,
String kOptions, String comment, List