Skip to content
Browse files

Merge branch 'testing' of git+ssh://git.eucalyptus-systems.com/eucaly…

…ptus into testing
  • Loading branch information...
2 parents 081cba3 + dd3f75b commit 9190354fbe305f87ae964ae68f1309a1a294e6d1 @dmitrii dmitrii committed Oct 8, 2012
Showing with 2,484 additions and 1,302 deletions.
  1. +29 −0 clc/modules/cluster-manager/src/main/java/com/eucalyptus/vm/Bundles.java
  2. +8 −0 clc/modules/cluster-manager/src/main/java/com/eucalyptus/vm/Bundling.groovy
  3. +1 −1 clc/modules/cluster-manager/src/main/java/com/eucalyptus/vm/VmBundleTask.java
  4. +60 −18 clc/modules/cluster-manager/src/main/java/com/eucalyptus/vm/VmRuntimeState.java
  5. +1 −24 clc/modules/msgs/src/main/java/com/eucalyptus/context/Context.java
  6. +29 −3 clc/modules/msgs/src/main/java/com/eucalyptus/crypto/util/WSSecurity.java
  7. +1 −0 clc/modules/msgs/src/main/java/com/eucalyptus/records/EventType.java
  8. +47 −2 clc/modules/msgs/src/main/java/com/eucalyptus/ws/Handlers.java
  9. +15 −3 clc/modules/msgs/src/main/java/com/eucalyptus/ws/handlers/BindingHandler.java
  10. +5 −0 clc/modules/msgs/src/main/java/com/eucalyptus/ws/handlers/WsSecHandler.java
  11. +7 −1 clc/modules/msgs/src/main/java/com/eucalyptus/ws/server/NioServerHandler.java
  12. +7 −1 clc/modules/msgs/src/main/resources/cc-vms.xml
  13. +414 −0 clc/modules/msgs/src/main/resources/xml-security-config.xml
  14. +6 −1 clc/modules/wsstack/src/main/java/com/eucalyptus/ws/server/EucalyptusSoapPipeline.java
  15. +8 −1 clc/modules/wsstack/src/main/java/com/eucalyptus/ws/server/WalrusSoapPipeline.java
  16. +300 −293 cluster/CCclient.c
  17. +42 −3 cluster/cc-client-marshal-adb.c
  18. +1 −0 cluster/cc-client-marshal.h
  19. +62 −66 cluster/handlers-state.c
  20. +354 −291 cluster/handlers.c
  21. +1 −0 cluster/handlers.h
  22. +39 −2 cluster/server-marshal.c
  23. +1 −0 cluster/server-marshal.h
  24. +169 −170 net/vnetwork.c
  25. +5 −0 node/NCclient.c
  26. +87 −48 node/client-marshal-adb.c
  27. +4 −0 node/client-marshal-fake.c
  28. +4 −0 node/client-marshal-local.c
  29. +1 −0 node/client-marshal.h
  30. +203 −51 node/handlers.c
  31. +5 −0 node/handlers.h
  32. +302 −195 node/handlers_default.c
  33. +17 −17 node/handlers_kvm.c
  34. +7 −7 node/handlers_xen.c
  35. +61 −22 node/server-marshal.c
  36. +1 −0 node/server-marshal.h
  37. +8 −8 node/xml.c
  38. +0 −1 project/cluster
  39. +1 −0 project/cluster
  40. +6 −6 util/config.c
  41. +18 −18 util/euca_auth.c
  42. +2 −2 util/euca_axis.c
  43. +9 −9 util/fault.c
  44. +1 −1 util/hash.c
  45. +1 −1 util/ipc.c
  46. +36 −36 util/misc.c
  47. +49 −0 wsdl/eucalyptus_cc.wsdl
  48. +49 −0 wsdl/eucalyptus_nc.wsdl
View
29 clc/modules/cluster-manager/src/main/java/com/eucalyptus/vm/Bundles.java
@@ -131,6 +131,35 @@ public void fire( CancelBundleTaskResponseType reply ) {
}
}
+ public static MessageCallback bundleRestartInstanceCallback( BundleRestartInstanceType request ) {
+ return new BundleRestartInstanceCallback( request );
+ }
+
+ public static class BundleRestartInstanceCallback extends MessageCallback<BundleRestartInstanceType, BundleRestartInstanceResponseType> {
+ private BundleRestartInstanceCallback( BundleRestartInstanceType request ) {
+ super( request );
+ }
+
+ @Override
+ public void fire( BundleRestartInstanceResponseType reply ) {
+ if ( !reply.get_return( ) ) {
+ LOG.info( "Attempt to restart bundle instance " + this.getRequest( ).getInstanceId( ) + " has failed." );
+ } else {
+ EntityTransaction db = Entities.get( VmInstance.class );
+ try {
+ VmInstance vm = VmInstances.lookup( this.getRequest( ).getInstanceId( ) );
+ vm.getRuntimeState( ).restartBundleTask( );
+ EventRecord.here( CancelBundleCallback.class, EventType.BUNDLE_RESTART, this.getRequest( ).toSimpleString( ), vm.getRuntimeState( ).getBundleTask( ).getBundleId( ),
+ vm.getInstanceId( ) ).info( );
+ db.commit( );
+ } catch ( Exception ex ) {
+ Logs.exhaust( ).error( ex, ex );
+ db.rollback( );
+ }
+ }
+ }
+ }
+
public static class BundleCallback extends MessageCallback<BundleInstanceType, BundleInstanceResponseType> {
private BundleCallback( BundleInstanceType request ) {
super( request );
View
8 clc/modules/cluster-manager/src/main/java/com/eucalyptus/vm/Bundling.groovy
@@ -103,6 +103,14 @@ public class BundleInstanceType extends VmBundleMessage {
public class BundleInstanceResponseType extends VmBundleMessage {
BundleTask task;
}
+
+public class BundleRestartInstanceType extends VmBundleMessage {
+ String instanceId;
+}
+public class BundleRestartInstanceResponseType extends VmBundleMessage {
+ BundleTask task;
+}
+
public class CancelBundleTaskType extends VmBundleMessage {
String bundleId;
String instanceId;
View
2 clc/modules/cluster-manager/src/main/java/com/eucalyptus/vm/VmBundleTask.java
@@ -73,7 +73,7 @@
@Embeddable
public class VmBundleTask {
public enum BundleState {
- none( "none" ), pending( null ), storing( "bundling" ), canceling( null ), complete( "succeeded" ), failed( "failed" );
+ none( "none" ), pending( null ), storing( "bundling" ), canceling( null ), cancelled( "cancelled" ), complete( "succeeded" ), failed( "failed" );
private String mappedState;
BundleState( final String mappedState ) {
View
78 clc/modules/cluster-manager/src/main/java/com/eucalyptus/vm/VmRuntimeState.java
@@ -102,6 +102,7 @@
import com.eucalyptus.util.Exceptions;
import com.eucalyptus.util.async.AsyncRequests;
import com.eucalyptus.util.async.CheckedListenableFuture;
+import com.eucalyptus.vm.Bundles.BundleCallback;
import com.eucalyptus.vm.VmBundleTask.BundleState;
import com.eucalyptus.vm.VmInstance.Reason;
import com.eucalyptus.vm.VmInstance.VmState;
@@ -396,32 +397,44 @@ public Boolean cancelBundleTask( ) {
}
}
- public Boolean submittedBundleTask( ) {
- if ( this.getBundleTask( ) != null && this.getBundleTask( ).getState( ).ordinal( ) >= BundleState.storing.ordinal( ) ) {
- this.getBundleTask( ).setState( BundleState.storing );
- EventRecord.here( VmRuntimeState.class, EventType.BUNDLE_STARTING,
- this.vmInstance.getOwner( ).toString( ),
- this.getBundleTask( ).getBundleId( ),
- this.getVmInstance( ).getInstanceId( ),
- "" + this.getBundleTask( ).getState( ) ).info( );
- return true;
- } else if ( BundleState.canceling.equals( this.getBundleTaskState( ) ) ) {
- EventRecord.here( VmRuntimeState.class, EventType.BUNDLE_CANCELLED, this.vmInstance.getOwner( ).toString( ), this.getBundleTask( ).getBundleId( ),
+ public Boolean restartBundleTask( ) {
+ if ( this.getBundleTask( ) != null ) {
+ this.getBundleTask( ).setState( BundleState.none );
+ EventRecord.here( VmRuntimeState.class, EventType.BUNDLE_RESTART, this.vmInstance.getOwner( ).toString( ), this.getBundleTask( ).getBundleId( ),
this.getVmInstance( ).getInstanceId( ),
"" + this.getBundleTask( ).getState( ) ).info( );
- this.resetBundleTask( );
return true;
- } else {
- return false;
}
+ return false;
+ }
+
+ public Boolean submittedBundleTask( ) {
+ if ( this.getBundleTask( ) != null ) {
+ if ( BundleState.cancelled.equals( this.getBundleTaskState( ) ) ) {
+ EventRecord.here( VmRuntimeState.class, EventType.BUNDLE_CANCELLED, this.vmInstance.getOwner( ).toString( ), this.getBundleTask( ).getBundleId( ),
+ this.getVmInstance( ).getInstanceId( ),
+ "" + this.getBundleTask( ).getState( ) ).info( );
+ this.resetBundleTask( );
+ return true;
+ } else if ( this.getBundleTask( ).getState( ).ordinal( ) >= BundleState.storing.ordinal( ) ) {
+ this.getBundleTask( ).setState( BundleState.storing );
+ EventRecord.here( VmRuntimeState.class, EventType.BUNDLE_STARTING,
+ this.vmInstance.getOwner( ).toString( ),
+ this.getBundleTask( ).getBundleId( ),
+ this.getVmInstance( ).getInstanceId( ),
+ "" + this.getBundleTask( ).getState( ) ).info( );
+ return true;
+ }
+ }
+ return false;
}
public Boolean startBundleTask( final VmBundleTask task ) {
if ( !this.isBundling( ) ) {
this.bundleTask = task;
return true;
} else {
- if ( ( this.getBundleTask( ) != null ) && ( BundleState.failed.equals( task.getState() ) || BundleState.canceling.equals( task.getState() ) ) ) {
+ if ( ( this.getBundleTask( ) != null ) && ( BundleState.failed.equals( task.getState() ) || BundleState.canceling.equals( task.getState() ) || BundleState.cancelled.equals( task.getState() ) ) ) {
this.resetBundleTask( );
this.bundleTask = task;
return true;
@@ -496,14 +509,43 @@ public void updateBundleTaskState( String state ) {
updateBundleTaskState( next );
}
+ public void bundleRestartInstance(VmBundleTask bundleTask) {
+ BundleState state = bundleTask.getState();
+ if(BundleState.complete.equals(state) || BundleState.failed.equals(state) || BundleState.cancelled.equals(state)) {
+ final BundleRestartInstanceType request = new BundleRestartInstanceType();
+ final BundleRestartInstanceResponseType reply = request.getReply();
+
+ reply.set_return(true);
+ try {
+ LOG.info(EventRecord.here(BundleCallback.class, EventType.BUNDLE_RESTART, vmInstance.getOwner().getUserName(),
+ bundleTask.getBundleId(),
+ vmInstance.getInstanceId()));
+
+ ServiceConfiguration ccConfig = Topology.lookup(ClusterController.class, vmInstance.lookupPartition());
+ final Cluster cluster = Clusters.lookup(ccConfig );
+
+ request.setInstanceId(vmInstance.getInstanceId());
+ reply.setTask(Bundles.transform(bundleTask));
+ AsyncRequests.newRequest(Bundles.bundleRestartInstanceCallback(request)).dispatch(cluster.getConfiguration());
+ } catch (final Exception e) {
+ Logs.extreme().trace("Failed to find bundle task: " + bundleTask.getBundleId());
+ }
+ }
+ }
+
public void updateBundleTaskState( BundleState state ) {
if ( this.getBundleTask( ) != null ) {
final BundleState current = this.getBundleTask( ).getState( );
- if ( BundleState.complete.equals( state ) && !BundleState.complete.equals( current ) ) {
+ if ( BundleState.complete.equals( state ) && !BundleState.complete.equals( current ) && !BundleState.none.equals( current )) {
+ this.getBundleTask( ).setState( state );
+ bundleRestartInstance(this.getBundleTask());
+ } else if ( BundleState.failed.equals( state ) && !BundleState.failed.equals( current ) && !BundleState.none.equals( current )) {
this.getBundleTask( ).setState( state );
- } else if ( BundleState.failed.equals( state ) && !BundleState.failed.equals( current ) ) {
+ bundleRestartInstance(this.getBundleTask());
+ } else if ( BundleState.cancelled.equals( state ) && !BundleState.cancelled.equals( current ) && !BundleState.none.equals( current )) {
this.getBundleTask( ).setState( state );
- } else if ( BundleState.canceling.equals( current ) || BundleState.canceling.equals( state ) ) {
+ bundleRestartInstance(this.getBundleTask());
+ } else if ( BundleState.canceling.equals( state ) || BundleState.canceling.equals( current ) ) {
//
} else if ( BundleState.pending.equals( current ) && !BundleState.none.equals( state ) ) {
this.getBundleTask( ).setState( state );
View
25 clc/modules/msgs/src/main/java/com/eucalyptus/context/Context.java
@@ -177,31 +177,8 @@ public UserFullName getUserFullName( ) {
return UserFullName.getInstance( this.getUser( ) );
}
- public OwnerFullName getEffectiveUserFullName( ) {
- String effectiveUserId = this.getRequest( ).getEffectiveUserId( );
- if ( this.getRequest( ) != null && Principals.systemFullName( ).getUserName( ).equals( effectiveUserId ) ) {
- return Principals.systemFullName( );
- /** system **/
- } else if ( this.getRequest( ) == null || effectiveUserId == null ) {
- return Principals.nobodyFullName( );
- /** unset **/
- } else if ( !effectiveUserId.equals( this.getUserFullName( ).getUserName( ) ) ) {
- try {
- return UserFullName.getInstance( Accounts.lookupUserByName( effectiveUserId ) );
- } catch ( RuntimeException ex ) {
- LOG.error( ex );
- return UserFullName.getInstance( this.getUser( ) );
- } catch ( AuthException ex ) {
- LOG.error( ex, ex );
- return UserFullName.getInstance( this.getUser( ) );
- }
- } else {
- return UserFullName.getInstance( this.getUser( ) );
- }
- }
-
public boolean hasAdministrativePrivileges( ) {
- return Principals.systemFullName().equals( this.getEffectiveUserFullName( ) ) || this.getUser( ).isSystemAdmin( );
+ return this.getUser( ).isSystemAdmin( );
}
public User getUser( ) {
View
32 clc/modules/msgs/src/main/java/com/eucalyptus/crypto/util/WSSecurity.java
@@ -87,6 +87,8 @@
import org.apache.ws.security.message.token.X509Security;
import org.apache.ws.security.processor.TimestampProcessor;
import org.apache.ws.security.util.WSSecurityUtil;
+import org.apache.xml.security.c14n.Canonicalizer;
+import org.apache.xml.security.c14n.InvalidCanonicalizerException;
import org.apache.xml.security.exceptions.XMLSecurityException;
import org.apache.xml.security.keys.KeyInfo;
import org.apache.xml.security.signature.SignedInfo;
@@ -109,14 +111,24 @@
public class WSSecurity {
private static Logger LOG = Logger.getLogger( WSSecurity.class );
private static CertificateFactory factory;
-
+ private static final String SYSTEM_PROPERTY_SKIP_SECURITY_CHECK = "com.eucalyptus.crypto.util.skipWsSecurityConfigurationChecks";
+
static {
+ System.setProperty( "org.apache.xml.security.resource.config", "/xml-security-config.xml" );
org.apache.xml.security.Init.init( );
+ if ( !acceptXmlSecurityConfiguration() ) {
+ LOG.fatal("XML Security configuration not applied, set system property "+SYSTEM_PROPERTY_SKIP_SECURITY_CHECK+"=true to skip check");
+ throw new RuntimeException("XML Security Configuration not applied");
+ }
WSSConfig.getDefaultWSConfig( ).addJceProvider( "BC", BouncyCastleProvider.class.getCanonicalName( ) );
WSSConfig.getDefaultWSConfig( ).setTimeStampStrict( true );
WSSConfig.getDefaultWSConfig( ).setEnableSignatureConfirmation( true );
}
-
+
+ public static void init() {
+ // currently the static initializer does the work
+ }
+
public static CertificateFactory getCertificateFactory( ) {
if ( factory == null ) {
try {
@@ -388,5 +400,19 @@ private static XMLSignature checkSignature( final Element securityNode ) throws
if ( sig.getKeyInfo( ) == null ) throw new WSSecurityException( WSSecurityException.SECURITY_TOKEN_UNAVAILABLE );
return sig;
}
-
+
+ private static boolean acceptXmlSecurityConfiguration() {
+ return
+ Boolean.parseBoolean(System.getProperty(SYSTEM_PROPERTY_SKIP_SECURITY_CHECK)) ||
+ isValidXmlSecurityConfiguration();
+ }
+
+ private static boolean isValidXmlSecurityConfiguration() {
+ try {
+ Canonicalizer.getInstance( "http://www.w3.org/2006/12/xml-c14n11" );
+ return false;
+ } catch (InvalidCanonicalizerException e) {
+ return true;
+ }
+ }
}
View
1 clc/modules/msgs/src/main/java/com/eucalyptus/records/EventType.java
@@ -112,6 +112,7 @@
BUNDLE_RESET,
BUNDLE_STARTED,
BUNDLE_STARTING,
+ BUNDLE_RESTART,
BUNDLE_TRANSITION,
CERTIFICATE_WRITE,
CHANNEL_WRITE,
View
49 clc/modules/msgs/src/main/java/com/eucalyptus/ws/Handlers.java
@@ -62,6 +62,8 @@
package com.eucalyptus.ws;
+import static com.eucalyptus.component.ComponentId.ComponentMessage;
+import static com.eucalyptus.component.ComponentId.ComponentPart;
import java.net.URI;
import java.util.HashMap;
import java.util.List;
@@ -70,6 +72,7 @@
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
+import javax.annotation.Nullable;
import org.apache.log4j.Logger;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
@@ -122,6 +125,7 @@
import com.eucalyptus.http.MappingHttpRequest;
import com.eucalyptus.http.MappingHttpResponse;
import com.eucalyptus.records.Logs;
+import com.eucalyptus.system.Ats;
import com.eucalyptus.util.Exceptions;
import com.eucalyptus.ws.handlers.BindingHandler;
import com.eucalyptus.ws.handlers.InternalWsSecHandler;
@@ -415,7 +419,43 @@ public void handleUpstream( final ChannelHandlerContext ctx, final ChannelEvent
};
}
-
+
+ @ChannelPipelineCoverage( "one" )
+ private static final class ComponentMessageCheckHandler implements ChannelUpstreamHandler {
+ @Nullable
+ private final Class<? extends ComponentId> componentIdClass;
+
+ private ComponentMessageCheckHandler( final Class<? extends ComponentId> componentIdClass ) {
+ this.componentIdClass = componentIdClass;
+ }
+
+ @Override
+ public void handleUpstream( final ChannelHandlerContext channelHandlerContext,
+ final ChannelEvent channelEvent ) throws Exception {
+ if ( channelEvent instanceof MessageEvent && componentIdClass != null ) {
+ final BaseMessage message = BaseMessage.extractMessage( channelEvent );
+ final ComponentMessage componentMessage = message==null ? null :
+ Ats.inClassHierarchy( message ).get( ComponentMessage.class );
+ if ( message != null && (componentMessage == null || !componentIdClass.equals( componentMessage.value() ) ) ) {
+ LOG.warn( String.format("Message %s does not match pipeline component %s",
+ message.getClass(),
+ componentIdClass.getSimpleName() ) );
+
+ final MappingHttpMessage mappingHttpMessage = MappingHttpMessage.extractMessage( channelEvent );
+ final BaseMessage baseMessage = BaseMessage.extractMessage( channelEvent );
+ if ( baseMessage != null ) {
+ Contexts.clear( Contexts.lookup( baseMessage.getCorrelationId()) );
+ }
+ channelHandlerContext.getChannel( ).write( new MappingHttpResponse(
+ mappingHttpMessage==null ? HttpVersion.HTTP_1_1 : mappingHttpMessage.getProtocolVersion( ),
+ HttpResponseStatus.BAD_REQUEST ) );
+ return;
+ }
+ }
+ channelHandlerContext.sendUpstream( channelEvent );
+ }
+ }
+
static void sendRedirect( final ChannelHandlerContext ctx, final ChannelEvent e, final Class<? extends ComponentId> compClass, final MappingHttpRequest request ) {
e.getFuture( ).cancel( );
String redirectUri = null;
@@ -477,7 +517,12 @@ public void handleUpstream( final ChannelHandlerContext ctx, final ChannelEvent
}
}
-
+
+ public static void addComponentHandlers( final Class<? extends ComponentId> componentIdClass,
+ final ChannelPipeline pipeline ) {
+ pipeline.addLast( "msg-component-check", new ComponentMessageCheckHandler( componentIdClass ) );
+ }
+
public static void addSystemHandlers( final ChannelPipeline pipeline ) {
pipeline.addLast( "service-state-check", internalServiceStateHandler( ) );
pipeline.addLast( "service-specific-mangling", ServiceHackeryHandler.INSTANCE );
View
18 clc/modules/msgs/src/main/java/com/eucalyptus/ws/handlers/BindingHandler.java
@@ -62,6 +62,7 @@
package com.eucalyptus.ws.handlers;
+import java.util.regex.Pattern;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMNamespace;
import org.apache.log4j.Logger;
@@ -88,19 +89,27 @@
private Binding binding;
private String namespace;
private final Binding defaultBinding;
+ private final Pattern namespacePattern;
public BindingHandler( ) {
super( );
this.defaultBinding = null;
- this.namespace = null;
+ this.namespacePattern = null;
}
public BindingHandler( final Binding binding ) {
this.binding = binding;
this.defaultBinding = binding;
- this.namespace = null;
+ this.namespacePattern = null;
}
-
+
+ public BindingHandler( final Binding binding,
+ final Pattern namespacePattern ) {
+ this.binding = binding;
+ this.defaultBinding = binding;
+ this.namespacePattern = namespacePattern;
+ }
+
@Override
public void incomingMessage( final MessageEvent event ) throws Exception {
if ( event.getMessage( ) instanceof MappingHttpMessage ) {
@@ -112,6 +121,9 @@ public void incomingMessage( final MessageEvent event ) throws Exception {
OMElement elem = httpMessage.getOmMessage( );
OMNamespace omNs = elem.getNamespace( );
namespace = omNs.getNamespaceURI( );
+ if ( namespacePattern != null && !namespacePattern.matcher( namespace ).matches() ) {
+ throw new WebServicesException( "Invalid request" );
+ }
this.binding = BindingManager.getBinding( BindingManager.sanitizeNamespace( namespace ) );
msgType = this.binding.getElementClass( httpMessage.getOmMessage( ).getLocalName( ) );
} catch ( BindingException ex ) {
View
5 clc/modules/msgs/src/main/java/com/eucalyptus/ws/handlers/WsSecHandler.java
@@ -83,6 +83,7 @@
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import com.eucalyptus.binding.HoldMe;
+import com.eucalyptus.crypto.util.WSSecurity;
import com.eucalyptus.http.MappingHttpMessage;
import com.eucalyptus.ws.util.CredentialProxy;
@@ -91,6 +92,10 @@
private static Logger LOG = Logger.getLogger( WsSecHandler.class );
private final CredentialProxy credentials;
+ static {
+ WSSecurity.init();
+ }
+
public WsSecHandler( final CredentialProxy credentials ) {
this.credentials = credentials;
}
View
8 clc/modules/msgs/src/main/java/com/eucalyptus/ws/server/NioServerHandler.java
@@ -62,6 +62,7 @@
package com.eucalyptus.ws.server;
+import static com.eucalyptus.component.ComponentId.ComponentPart;
import java.util.concurrent.Callable;
import java.util.concurrent.atomic.AtomicReference;
import javax.security.auth.login.LoginException;
@@ -91,6 +92,7 @@
import com.eucalyptus.http.MappingHttpMessage;
import com.eucalyptus.http.MappingHttpRequest;
import com.eucalyptus.records.Logs;
+import com.eucalyptus.system.Ats;
import com.eucalyptus.util.Exceptions;
import com.eucalyptus.ws.Handlers;
import com.eucalyptus.ws.WebServicesException;
@@ -145,9 +147,13 @@ private void lookupPipeline( final ChannelHandlerContext ctx, final MessageEvent
if ( Logs.isExtrrreeeme( ) && request instanceof MappingHttpMessage ) {
Logs.extreme( ).trace( ( ( MappingHttpMessage ) request ).logMessage( ) );
}
- FilteredPipeline filteredPipeline = Pipelines.find( request );
+ final FilteredPipeline filteredPipeline = Pipelines.find( request );
if ( this.pipeline.compareAndSet( null, filteredPipeline ) ) {
this.pipeline.get( ).unroll( ctx.getPipeline( ) );
+ final Ats ats = Ats.inClassHierarchy( filteredPipeline );
+ Handlers.addComponentHandlers(
+ ats.has(ComponentPart.class) ? ats.get(ComponentPart.class).value() : null,
+ ctx.getPipeline() );
Handlers.addSystemHandlers( ctx.getPipeline( ) );
}
} catch ( DuplicatePipelineException e1 ) {
View
8 clc/modules/msgs/src/main/resources/cc-vms.xml
@@ -225,6 +225,12 @@
<mapping name="BundleInstanceResponse" class="com.eucalyptus.vm.BundleInstanceResponseType" extends="edu.ucsb.eucalyptus.msgs.EucalyptusMessage">
<structure map-as="edu.ucsb.eucalyptus.msgs.EucalyptusMessage" />
</mapping>
+ <mapping name="BundleRestartInstance" class="com.eucalyptus.vm.BundleRestartInstanceType" extends="edu.ucsb.eucalyptus.msgs.EucalyptusMessage">
+ <value name="instanceId" field="instanceId" usage="required" />
+ </mapping>
+ <mapping name="BundleRestartInstanceResponse" class="com.eucalyptus.vm.BundleRestartInstanceResponseType" extends="edu.ucsb.eucalyptus.msgs.EucalyptusMessage">
+ <structure map-as="edu.ucsb.eucalyptus.msgs.EucalyptusMessage" />
+ </mapping>
<mapping name="CancelBundleTask" class="com.eucalyptus.vm.CancelBundleTaskType" extends="edu.ucsb.eucalyptus.msgs.EucalyptusMessage">
<value name="instanceId" field="instanceId" usage="required" />
</mapping>
@@ -240,4 +246,4 @@
<structure map-as="edu.ucsb.eucalyptus.msgs.EucalyptusMessage" />
<value name="consoleOutput" field="output" />
</mapping>
-</binding>
+</binding>
View
414 clc/modules/msgs/src/main/resources/xml-security-config.xml
@@ -0,0 +1,414 @@
+<?xml version="1.0"?>
+<!--
+<!DOCTYPE Configuration SYSTEM "config.dtd">
+-->
+<!-- This configuration file is used for configuration of the org.apache.xml.security package -->
+<Configuration target="org.apache.xml.security" xmlns="http://www.xmlsecurity.org/NS/#configuration">
+ <CanonicalizationMethods>
+ <CanonicalizationMethod URI="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"
+ JAVACLASS="org.apache.xml.security.c14n.implementations.Canonicalizer20010315OmitComments" />
+ <CanonicalizationMethod URI="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"
+ JAVACLASS="org.apache.xml.security.c14n.implementations.Canonicalizer20010315WithComments" />
+
+ <CanonicalizationMethod URI="http://www.w3.org/2001/10/xml-exc-c14n#"
+ JAVACLASS="org.apache.xml.security.c14n.implementations.Canonicalizer20010315ExclOmitComments"/>
+ <CanonicalizationMethod URI="http://www.w3.org/2001/10/xml-exc-c14n#WithComments"
+ JAVACLASS="org.apache.xml.security.c14n.implementations.Canonicalizer20010315ExclWithComments"/>
+ <!-- Disabled as the JDK "config.xml" disables this
+ <CanonicalizationMethod URI="http://www.w3.org/2006/12/xml-c14n11"
+ JAVACLASS="org.apache.xml.security.c14n.implementations.Canonicalizer11_OmitComments"/> -->
+ <!-- Disabled as the JDK "config.xml" disables this
+ <CanonicalizationMethod URI="http://www.w3.org/2006/12/xml-c14n11#WithComments"
+ JAVACLASS="org.apache.xml.security.c14n.implementations.Canonicalizer11_WithComments"/> -->
+ </CanonicalizationMethods>
+ <TransformAlgorithms>
+ <!-- Base64 -->
+ <!-- Disabled as it facilitates DOS attacks
+ <TransformAlgorithm URI="http://www.w3.org/2000/09/xmldsig#base64"
+ JAVACLASS="org.apache.xml.security.transforms.implementations.TransformBase64Decode" /> -->
+ <!-- c14n omitting comments -->
+ <TransformAlgorithm URI="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"
+ JAVACLASS="org.apache.xml.security.transforms.implementations.TransformC14N" />
+ <!-- c14n with comments -->
+ <TransformAlgorithm URI="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"
+ JAVACLASS="org.apache.xml.security.transforms.implementations.TransformC14NWithComments" />
+ <!-- c14n 1.1 omitting comments -->
+ <!-- Disabled as the JDK "config.xml" disables this
+ <TransformAlgorithm URI="http://www.w3.org/2006/12/xml-c14n11"
+ JAVACLASS="org.apache.xml.security.transforms.implementations.TransformC14N11" /> -->
+ <!-- c14n 1.1 with comments -->
+ <!-- Disabled as the JDK "config.xml" disables this
+ <TransformAlgorithm URI="http://www.w3.org/2006/12/xml-c14n11#WithComments"
+ JAVACLASS="org.apache.xml.security.transforms.implementations.TransformC14N11_WithComments" /> -->
+ <!-- exclusive c14n omitting comments -->
+ <TransformAlgorithm URI="http://www.w3.org/2001/10/xml-exc-c14n#"
+ JAVACLASS="org.apache.xml.security.transforms.implementations.TransformC14NExclusive" />
+ <!-- exclusive c14n with comments -->
+ <TransformAlgorithm URI="http://www.w3.org/2001/10/xml-exc-c14n#WithComments"
+ JAVACLASS="org.apache.xml.security.transforms.implementations.TransformC14NExclusiveWithComments" />
+ <!-- XPath transform -->
+ <!-- Disabled as it facilitates DOS attacks and obscures the signed content
+ <TransformAlgorithm URI="http://www.w3.org/TR/1999/REC-xpath-19991116"
+ JAVACLASS="org.apache.xml.security.transforms.implementations.TransformXPath" /> -->
+ <!-- enveloped signature -->
+ <TransformAlgorithm URI="http://www.w3.org/2000/09/xmldsig#enveloped-signature"
+ JAVACLASS="org.apache.xml.security.transforms.implementations.TransformEnvelopedSignature" />
+ <!-- XSLT -->
+ <!-- Disabled as it facilitates DOS attacks and obscures the signed content
+ <TransformAlgorithm URI="http://www.w3.org/TR/1999/REC-xslt-19991116"
+ JAVACLASS="org.apache.xml.security.transforms.implementations.TransformXSLT" /> -->
+ <!-- XPath version 2 -->
+ <!-- Disabled as it facilitates DOS attacks and obscures the signed content
+ <TransformAlgorithm URI="http://www.w3.org/2002/04/xmldsig-filter2"
+ JAVACLASS="org.apache.xml.security.transforms.implementations.TransformXPath2Filter" /> -->
+ <!-- XPath version 2b -->
+ <!-- Disabled as it facilitates DOS attacks and obscures the signed content
+ <TransformAlgorithm URI="http://www.w3.org/2002/06/xmldsig-filter2"
+ JAVACLASS="org.apache.xml.security.transforms.implementations.TransformXPath2Filter" /> -->
+ </TransformAlgorithms>
+ <SignatureAlgorithms>
+ <SignatureAlgorithm URI="http://www.w3.org/2000/09/xmldsig#dsa-sha1"
+ JAVACLASS="org.apache.xml.security.algorithms.implementations.SignatureDSA" />
+ <SignatureAlgorithm URI="http://www.w3.org/2000/09/xmldsig#rsa-sha1"
+ JAVACLASS="org.apache.xml.security.algorithms.implementations.SignatureBaseRSA$SignatureRSASHA1" />
+ <SignatureAlgorithm URI="http://www.w3.org/2000/09/xmldsig#hmac-sha1"
+ JAVACLASS="org.apache.xml.security.algorithms.implementations.IntegrityHmac$IntegrityHmacSHA1" />
+
+ <!-- Disabled as MD5 should no longer be considered secure
+ <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-md5"
+ JAVACLASS="org.apache.xml.security.algorithms.implementations.SignatureBaseRSA$SignatureRSAMD5" /> -->
+ <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-ripemd160"
+ JAVACLASS="org.apache.xml.security.algorithms.implementations.SignatureBaseRSA$SignatureRSARIPEMD160" />
+ <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
+ JAVACLASS="org.apache.xml.security.algorithms.implementations.SignatureBaseRSA$SignatureRSASHA256" />
+ <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha384"
+ JAVACLASS="org.apache.xml.security.algorithms.implementations.SignatureBaseRSA$SignatureRSASHA384" />
+ <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"
+ JAVACLASS="org.apache.xml.security.algorithms.implementations.SignatureBaseRSA$SignatureRSASHA512" />
+ <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"
+ JAVACLASS="org.apache.xml.security.algorithms.implementations.SignatureECDSA$SignatureECDSASHA1" />
+
+ <!-- Disabled as MD5 should no longer be considered secure
+ <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-md5"
+ JAVACLASS="org.apache.xml.security.algorithms.implementations.IntegrityHmac$IntegrityHmacMD5" /> -->
+ <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-ripemd160"
+ JAVACLASS="org.apache.xml.security.algorithms.implementations.IntegrityHmac$IntegrityHmacRIPEMD160" />
+ <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha256"
+ JAVACLASS="org.apache.xml.security.algorithms.implementations.IntegrityHmac$IntegrityHmacSHA256" />
+ <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha384"
+ JAVACLASS="org.apache.xml.security.algorithms.implementations.IntegrityHmac$IntegrityHmacSHA384" />
+ <SignatureAlgorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha512"
+ JAVACLASS="org.apache.xml.security.algorithms.implementations.IntegrityHmac$IntegrityHmacSHA512" />
+ </SignatureAlgorithms>
+ <JCEAlgorithmMappings>
+ <Algorithms>
+ <!-- MessageDigest Algorithms -->
+ <!-- Disabled as MD5 should no longer be considered secure
+ <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#md5"
+ Description="MD5 message digest from RFC 1321"
+ AlgorithmClass="MessageDigest"
+ RequirementLevel="NOT RECOMMENDED"
+ SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+ JCEName="MD5"/> -->
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmlenc#ripemd160"
+ Description="RIPEMD-160 message digest"
+ AlgorithmClass="MessageDigest"
+ RequirementLevel="OPTIONAL"
+ JCEName="RIPEMD160"/>
+
+ <Algorithm URI="http://www.w3.org/2000/09/xmldsig#sha1"
+ Description="SHA-1 message digest"
+ AlgorithmClass="MessageDigest"
+ RequirementLevel="REQUIRED"
+ JCEName="SHA-1"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmlenc#sha256"
+ Description="SHA-1 message digest with 256 bit"
+ AlgorithmClass="MessageDigest"
+ RequirementLevel="RECOMMENDED"
+ JCEName="SHA-256"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#sha384"
+ Description="SHA message digest with 384 bit"
+ AlgorithmClass="MessageDigest"
+ RequirementLevel="OPTIONAL"
+ SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+ JCEName="SHA-384"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmlenc#sha512"
+ Description="SHA-1 message digest with 512 bit"
+ AlgorithmClass="MessageDigest"
+ RequirementLevel="OPTIONAL"
+ JCEName="SHA-512"/>
+
+ <!-- Signature Algorithms -->
+ <Algorithm URI="http://www.w3.org/2000/09/xmldsig#dsa-sha1"
+ Description="Digital Signature Algorithm with SHA-1 message digest"
+ AlgorithmClass="Signature"
+ RequirementLevel="REQUIRED"
+ JCEName="SHA1withDSA"/>
+
+ <!-- Disabled as MD5 should no longer be considered secure
+ <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-md5"
+ Description="RSA Signature with MD5 message digest"
+ AlgorithmClass="Signature"
+ RequirementLevel="NOT RECOMMENDED"
+ SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+ JCEName="MD5withRSA"/> -->
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-ripemd160"
+ Description="RSA Signature with RIPEMD-160 message digest"
+ AlgorithmClass="Signature"
+ RequirementLevel="OPTIONAL"
+ SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+ JCEName="RIPEMD160withRSA"/>
+
+ <Algorithm URI="http://www.w3.org/2000/09/xmldsig#rsa-sha1"
+ Description="RSA Signature with SHA-1 message digest"
+ AlgorithmClass="Signature"
+ RequirementLevel="RECOMMENDED"
+ JCEName="SHA1withRSA"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
+ Description="RSA Signature with SHA-256 message digest"
+ AlgorithmClass="Signature"
+ RequirementLevel="OPTIONAL"
+ SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+ JCEName="SHA256withRSA"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha384"
+ Description="RSA Signature with SHA-384 message digest"
+ AlgorithmClass="Signature"
+ RequirementLevel="OPTIONAL"
+ SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+ JCEName="SHA384withRSA"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"
+ Description="RSA Signature with SHA-512 message digest"
+ AlgorithmClass="Signature"
+ RequirementLevel="OPTIONAL"
+ SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+ JCEName="SHA512withRSA"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"
+ Description="ECDSA Signature with SHA-1 message digest"
+ AlgorithmClass="Signature"
+ RequirementLevel="OPTIONAL"
+ SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+ JCEName="ECDSAwithSHA1"/>
+
+ <!-- MAC Algorithms -->
+ <!-- Disabled as MD5 should no longer be considered secure
+ <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-md5"
+ Description="Message Authentication code using MD5"
+ AlgorithmClass="Mac"
+ RequirementLevel="NOT RECOMMENDED"
+ SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+ JCEName="HmacMD5"/> -->
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-ripemd160"
+ Description="Message Authentication code using RIPEMD-160"
+ AlgorithmClass="Mac"
+ RequirementLevel="OPTIONAL"
+ SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+ JCEName="HMACRIPEMD160"/>
+
+ <Algorithm URI="http://www.w3.org/2000/09/xmldsig#hmac-sha1"
+ Description="Message Authentication code using SHA1"
+ AlgorithmClass="Mac"
+ RequirementLevel="REQUIRED"
+ JCEName="HmacSHA1"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha256"
+ Description="Message Authentication code using SHA-256"
+ AlgorithmClass="Mac"
+ RequirementLevel="OPTIONAL"
+ SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+ JCEName="HmacSHA256"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha384"
+ Description="Message Authentication code using SHA-384"
+ AlgorithmClass="Mac"
+ RequirementLevel="OPTIONAL"
+ SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+ JCEName="HmacSHA384"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmldsig-more#hmac-sha512"
+ Description="Message Authentication code using SHA-512"
+ AlgorithmClass="Mac"
+ RequirementLevel="OPTIONAL"
+ SpecificationURL="http://www.ietf.org/internet-drafts/draft-eastlake-xmldsig-uri-02.txt"
+ JCEName="HmacSHA512"/>
+
+ <!-- Block encryption Algorithms -->
+ <Algorithm URI="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"
+ Description="Block encryption using Triple-DES"
+ AlgorithmClass="BlockEncryption"
+ RequirementLevel="REQUIRED"
+ KeyLength="192"
+ RequiredKey="DESede"
+ JCEName="DESede/CBC/ISO10126Padding"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmlenc#aes128-cbc"
+ Description="Block encryption using AES with a key length of 128 bit"
+ AlgorithmClass="BlockEncryption"
+ RequirementLevel="REQUIRED"
+ KeyLength="128"
+ RequiredKey="AES"
+ JCEName="AES/CBC/ISO10126Padding"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmlenc#aes192-cbc"
+ Description="Block encryption using AES with a key length of 192 bit"
+ AlgorithmClass="BlockEncryption"
+ RequirementLevel="OPTIONAL"
+ KeyLength="192"
+ RequiredKey="AES"
+ JCEName="AES/CBC/ISO10126Padding"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmlenc#aes256-cbc"
+ Description="Block encryption using AES with a key length of 256 bit"
+ AlgorithmClass="BlockEncryption"
+ RequirementLevel="REQUIRED"
+ KeyLength="256"
+ RequiredKey="AES"
+ JCEName="AES/CBC/ISO10126Padding"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmlenc#rsa-1_5"
+ Description="Key Transport RSA-v1.5"
+ AlgorithmClass="KeyTransport"
+ RequirementLevel="REQUIRED"
+ RequiredKey="RSA"
+ JCEName="RSA/ECB/PKCS1Padding"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"
+ Description="Key Transport RSA-OAEP"
+ AlgorithmClass="KeyTransport"
+ RequirementLevel="REQUIRED"
+ RequiredKey="RSA"
+ JCEName="RSA/ECB/OAEPWithSHA1AndMGF1Padding"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmlenc#dh"
+ Description="Key Agreement Diffie-Hellman"
+ AlgorithmClass="KeyAgreement"
+ RequirementLevel="OPTIONAL"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-tripledes"
+ Description="Symmetric Key Wrap using Triple DES"
+ AlgorithmClass="SymmetricKeyWrap"
+ RequirementLevel="REQUIRED"
+ KeyLength="192"
+ RequiredKey="DESede"
+ JCEName="DESedeWrap"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-aes128"
+ Description="Symmetric Key Wrap using AES with a key length of 128 bit"
+ AlgorithmClass="SymmetricKeyWrap"
+ RequirementLevel="REQUIRED"
+ KeyLength="128"
+ RequiredKey="AES"
+ JCEName="AESWrap"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-aes192"
+ Description="Symmetric Key Wrap using AES with a key length of 192 bit"
+ AlgorithmClass="SymmetricKeyWrap"
+ RequirementLevel="OPTIONAL"
+ KeyLength="192"
+ RequiredKey="AES"
+ JCEName="AESWrap"/>
+
+ <Algorithm URI="http://www.w3.org/2001/04/xmlenc#kw-aes256"
+ Description="Symmetric Key Wrap using AES with a key length of 256 bit"
+ AlgorithmClass="SymmetricKeyWrap"
+ RequirementLevel="REQUIRED"
+ KeyLength="256"
+ RequiredKey="AES"
+ JCEName="AESWrap"/>
+
+ </Algorithms>
+ </JCEAlgorithmMappings>
+ <ResourceBundles defaultLanguageCode="en" defaultCountryCode="US">
+ <ResourceBundle LanguageCode="en"
+ CountryCode="US"
+ LOCATION="org.apache.xml.security/resource/xmlsecurity_en.properties" />
+ <ResourceBundle LanguageCode="de"
+ CountryCode="DE"
+ LOCATION="org.apache.xml.security/resource/xmlsecurity_de.properties" />
+ </ResourceBundles>
+ <ResourceResolvers>
+ <!-- Disabled to prevent HTTP references
+ <Resolver JAVACLASS="org.apache.xml.security.utils.resolver.implementations.ResolverDirectHTTP"
+ DESCRIPTION="A simple resolver for requests to HTTP space" /> -->
+ <!-- Disabled to prevent filesystem references
+ <Resolver JAVACLASS="org.apache.xml.security.utils.resolver.implementations.ResolverLocalFilesystem"
+ DESCRIPTION="A simple resolver for requests to the local file system" /> -->
+ <Resolver JAVACLASS="org.apache.xml.security.utils.resolver.implementations.ResolverFragment"
+ DESCRIPTION="A simple resolver for requests of same-document URIs" />
+ <Resolver JAVACLASS="org.apache.xml.security.utils.resolver.implementations.ResolverXPointer"
+ DESCRIPTION="A simple resolver for requests of XPointer fragents" />
+</ResourceResolvers>
+<!-- <defaultLocale languageCode="en" countryCode="US" /> -->
+ <KeyInfo>
+ <ContentHandler LOCALNAME="KeyName"
+ NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
+ JAVACLASS="org.apache.xml.security.keys.content.KeyName" />
+ <ContentHandler LOCALNAME="KeyValue"
+ NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
+ JAVACLASS="org.apache.xml.security.keys.content.KeyValue" />
+ <ContentHandler LOCALNAME="RetrievalMethod"
+ NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
+ JAVACLASS="org.apache.xml.security.keys.content.RetrievalMethod" />
+ <ContentHandler LOCALNAME="X509Data"
+ NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
+ JAVACLASS="org.apache.xml.security.keys.content.X509Data" />
+ <ContentHandler LOCALNAME="PGPData"
+ NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
+ JAVACLASS="org.apache.xml.security.keys.content.PGPData" />
+ <ContentHandler LOCALNAME="SPKIData"
+ NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
+ JAVACLASS="org.apache.xml.security.keys.content.SPKIData" />
+ <ContentHandler LOCALNAME="MgmtData"
+ NAMESPACE="http://www.w3.org/2000/09/xmldsig#"
+ JAVACLASS="org.apache.xml.security.keys.content.MgmtData" />
+ </KeyInfo>
+ <KeyResolver>
+ <!-- This section contains a list of KeyResolvers that are available in
+ every KeyInfo object -->
+ <Resolver JAVACLASS="org.apache.xml.security.keys.keyresolver.implementations.RSAKeyValueResolver"
+ DESCRIPTION="Can extract RSA public keys" />
+ <Resolver JAVACLASS="org.apache.xml.security.keys.keyresolver.implementations.DSAKeyValueResolver"
+ DESCRIPTION="Can extract DSA public keys" />
+ <Resolver JAVACLASS="org.apache.xml.security.keys.keyresolver.implementations.X509CertificateResolver"
+ DESCRIPTION="Can extract public keys from X509 certificates" />
+ <Resolver JAVACLASS="org.apache.xml.security.keys.keyresolver.implementations.X509SKIResolver"
+ DESCRIPTION="Uses an X509v3 SubjectKeyIdentifier extension to retrieve a certificate from the storages" />
+ <Resolver JAVACLASS="org.apache.xml.security.keys.keyresolver.implementations.RetrievalMethodResolver"
+ DESCRIPTION="Resolves keys and certificates using ResourceResolvers" />
+ <Resolver JAVACLASS="org.apache.xml.security.keys.keyresolver.implementations.X509SubjectNameResolver"
+ DESCRIPTION="Uses an X509 SubjectName to retrieve a certificate from the storages" />
+ <Resolver JAVACLASS="org.apache.xml.security.keys.keyresolver.implementations.X509IssuerSerialResolver"
+ DESCRIPTION="Uses an X509 IssuerName and IssuerSerial to retrieve a certificate from the storages" />
+ </KeyResolver>
+
+ <PrefixMappings>
+ <!-- Many classes create Elements which are in a specific namespace;
+ here, the prefixes for these namespaces are defined. But this
+ can also be overwritten using the ElementProxy#setDefaultPrefix()
+ method. You can even set all prefixes to "" so that the corresponding
+ elements are created using the default namespace -->
+ <PrefixMapping namespace="http://www.w3.org/2000/09/xmldsig#"
+ prefix="ds" />
+ <PrefixMapping namespace="http://www.w3.org/2001/04/xmlenc#"
+ prefix="xenc" />
+ <PrefixMapping namespace="http://www.xmlsecurity.org/experimental#"
+ prefix="experimental" />
+ <PrefixMapping namespace="http://www.w3.org/2002/04/xmldsig-filter2"
+ prefix="dsig-xpath-old" />
+ <PrefixMapping namespace="http://www.w3.org/2002/06/xmldsig-filter2"
+ prefix="dsig-xpath" />
+ <PrefixMapping namespace="http://www.w3.org/2001/10/xml-exc-c14n#"
+ prefix="ec" />
+ <PrefixMapping namespace="http://www.nue.et-inf.uni-siegen.de/~geuer-pollmann/#xpathFilter"
+ prefix="xx" />
+ </PrefixMappings>
+</Configuration>
View
7 clc/modules/wsstack/src/main/java/com/eucalyptus/ws/server/EucalyptusSoapPipeline.java
@@ -62,6 +62,7 @@
package com.eucalyptus.ws.server;
+import java.util.regex.Pattern;
import org.jboss.netty.channel.ChannelPipeline;
import org.jboss.netty.handler.codec.http.HttpRequest;
import com.eucalyptus.binding.BindingManager;
@@ -89,7 +90,11 @@ public String getName( ) {
@Override
public ChannelPipeline addHandlers( ChannelPipeline pipeline ) {
auth.unrollStage( pipeline );
- pipeline.addLast( "binding", new BindingHandler( BindingManager.getBinding( DEFAULT_EC2_SOAP_NAMESPACE ) ) );
+ pipeline.addLast( "binding",
+ new BindingHandler(
+ BindingManager.getBinding( DEFAULT_EC2_SOAP_NAMESPACE ),
+ Pattern.compile( "http://ec2.amazonaws.com/doc/\\d\\d\\d\\d-\\d\\d-\\d\\d/" ) )
+ );
return pipeline;
}
}
View
9 clc/modules/wsstack/src/main/java/com/eucalyptus/ws/server/WalrusSoapPipeline.java
@@ -62,8 +62,10 @@
package com.eucalyptus.ws.server;
+import java.util.regex.Pattern;
import org.jboss.netty.channel.ChannelPipeline;
import org.jboss.netty.handler.codec.http.HttpRequest;
+import com.eucalyptus.binding.BindingManager;
import com.eucalyptus.component.ComponentId.ComponentPart;
import com.eucalyptus.component.id.Walrus;
import com.eucalyptus.ws.handlers.BindingHandler;
@@ -72,6 +74,8 @@
@ComponentPart( Walrus.class )
public class WalrusSoapPipeline extends FilteredPipeline {
+ private static final String DEFAULT_S3_SOAP_NAMESPACE = "http://s3.amazonaws.com/doc/2006-03-01/"; //TODO: @Configurable
+
private final UnrollableStage auth = new WalrusSoapUserAuthenticationStage( );
@Override
@@ -87,7 +91,10 @@ public String getName( ) {
@Override
public ChannelPipeline addHandlers( ChannelPipeline pipeline ) {
auth.unrollStage( pipeline );
- pipeline.addLast( "binding", new BindingHandler( ) );
+ pipeline.addLast( "binding",
+ new BindingHandler(
+ BindingManager.getBinding(DEFAULT_S3_SOAP_NAMESPACE),
+ Pattern.compile("http://s3.amazonaws.com/doc/\\d\\d\\d\\d-\\d\\d-\\d\\d/") ) );
return pipeline;
}
View
593 cluster/CCclient.c
@@ -82,308 +82,315 @@ const char * euca_client_component_name = "clc";
ncMetadata mymeta;
int main(int argc, char **argv) {
- axutil_env_t * env = NULL;
- axis2_char_t * client_home = NULL;
- axis2_char_t endpoint_uri[256], *tmpstr;
- axis2_stub_t * stub = NULL;
- int rc, i, port, use_wssec;
- char *euca_home, configFile[1024], policyFile[1024];
+ axutil_env_t * env = NULL;
+ axis2_char_t * client_home = NULL;
+ axis2_char_t endpoint_uri[256], *tmpstr;
+ axis2_stub_t * stub = NULL;
+ int rc, i, port, use_wssec;
+ char *euca_home, configFile[1024], policyFile[1024];
- mymeta.userId = strdup("admin");
- mymeta.correlationId = strdup("1234abcd");
- mymeta.epoch = 3;
- mymeta.servicesLen = 16;
- snprintf(mymeta.services[15].name, 16, "eucalyptusname");
- snprintf(mymeta.services[15].type, 16, "eucalyptustype");
- snprintf(mymeta.services[15].partition, 16, "eucalyptuspart");
- mymeta.services[15].urisLen = 1;
- snprintf(mymeta.services[15].uris[0], 512, "http://192.168.254.3:8773/services/Eucalyptus");
-
- if (MODE == 0) {
- if (argc != 2 || strcmp(argv[1], "-9")) {
- printf("only runnable from inside euca\n");
- exit(1);
- }
- } else {
- if (argc < 3) {
- printf("USAGE: CCclient <host:port> <command> <opts>\n");
- exit(1);
- }
- }
-
- euca_home = getenv("EUCALYPTUS");
- if (!euca_home) {
- euca_home = "";
- }
- snprintf(configFile, 1024, EUCALYPTUS_CONF_LOCATION, euca_home);
- snprintf(policyFile, 1024, EUCALYPTUS_KEYS_DIR "/cc-client-policy.xml", euca_home);
+ mymeta.userId = strdup("admin");
+ mymeta.correlationId = strdup("1234abcd");
+ mymeta.epoch = 3;
+ mymeta.servicesLen = 16;
+ snprintf(mymeta.services[15].name, 16, "eucalyptusname");
+ snprintf(mymeta.services[15].type, 16, "eucalyptustype");
+ snprintf(mymeta.services[15].partition, 16, "eucalyptuspart");
+ mymeta.services[15].urisLen = 1;
+ snprintf(mymeta.services[15].uris[0], 512, "http://192.168.254.3:8773/services/Eucalyptus");
- rc = get_conf_var(configFile, "CC_PORT", &tmpstr);
- if (rc != 1) {
- // error
- logprintf("ERROR: parsing config file (%s) for CC_PORT\n",configFile);
- exit(1);
- } else {
- port = atoi(tmpstr);
- }
-
- rc = get_conf_var(configFile, "ENABLE_WS_SECURITY", &tmpstr);
- if (rc != 1) {
- /* Default to enabled */
- use_wssec = 1;
- } else {
- if (!strcmp(tmpstr, "Y")) {
- use_wssec = 1;
- } else {
- use_wssec = 0;
- }
- }
-
- if (MODE == 0) {
- snprintf(endpoint_uri, 256,"http://localhost:%d/axis2/services/EucalyptusCC", port);
- } else {
- snprintf(endpoint_uri, 256,"http://%s/axis2/services/EucalyptusCC", argv[1]);
- }
- //env = axutil_env_create_all(NULL, 0);
- env = axutil_env_create_all("/tmp/fofo", AXIS2_LOG_LEVEL_TRACE);
-
- client_home = AXIS2_GETENV("AXIS2C_HOME");
- if (!client_home) {
- printf("must have AXIS2C_HOME set\n");
- exit(1);
- }
- stub = axis2_stub_create_EucalyptusCC(env, client_home, endpoint_uri);
-
- if (use_wssec) {
- rc = InitWSSEC(env, stub, policyFile);
- if (rc) {
- printf("cannot initialize WS-SEC policy (%s)\n",policyFile);
- exit(1);
- }
- }
-
- if (MODE == 0) {
- rc = cc_killallInstances(env, stub);
- if (rc != 0) {
- printf("cc_killallInstances() failed\n");
- exit(1);
- }
- } else {
- /*
- if (!strcmp(argv[2], "registerImage")) {
- rc = cc_registerImage(argv[3], env, stub);
- if (rc != 0) {
- printf("cc_registerImage() failed: in:%s out:%d\n", argv[3], rc);
- exit(1);
- }
- */
- if (!strcmp(argv[2], "runInstances")) {
- char *amiId=NULL, *amiURL=NULL, *kernelId=NULL, *kernelURL=NULL, *ramdiskId=NULL, *ramdiskURL=NULL;
- if (argv[3]) amiId = argv[3];
- if (argv[4]) amiURL = argv[4];
- if (argv[5]) kernelId = argv[5];
- if (argv[6]) kernelURL = argv[6];
- if (argv[10]) ramdiskId = argv[10];
- if (argv[11]) ramdiskURL = argv[11];
+ if (MODE == 0) {
+ if (argc != 2 || strcmp(argv[1], "-9")) {
+ printf("only runnable from inside euca\n");
+ exit(1);
+ }
+ } else {
+ if (argc < 3) {
+ printf("USAGE: CCclient <host:port> <command> <opts>\n");
+ exit(1);
+ }
+ }
- virtualMachine params = { 64, 1, 64, "m1.small" };
+ euca_home = getenv("EUCALYPTUS");
+ if (!euca_home) {
+ euca_home = "";
+ }
+ snprintf(configFile, 1024, EUCALYPTUS_CONF_LOCATION, euca_home);
+ snprintf(policyFile, 1024, EUCALYPTUS_KEYS_DIR "/cc-client-policy.xml", euca_home);
- rc = cc_runInstances(amiId, amiURL, kernelId, kernelURL, ramdiskId, ramdiskURL, atoi(argv[7]), atoi(argv[8]), argv[9], &params, env, stub);
- if (rc != 0) {
- printf("cc_runInstances() failed: in:%s out:%d\n", argv[4], rc);
- exit(1);
- }
- } else if (!strcmp(argv[2], "describeInstances")) {
- rc = cc_describeInstances(NULL, 0, env, stub);
- if (rc != 0) {
- printf("cc_describeInstances() failed\n");
- exit(1);
- }
- } else if (!strcmp(argv[2], "describeServices")) {
- rc = cc_describeServices(env, stub);
- if (rc != 0) {
- printf("cc_describeServices() failed\n");
- exit(1);
- }
- } else if (!strcmp(argv[2], "startService")) {
- rc = cc_startService(env, stub);
- if (rc != 0) {
- printf("cc_startService() failed\n");
- exit(1);
- }
- } else if (!strcmp(argv[2], "stopService")) {
- rc = cc_stopService(env, stub);
- if (rc != 0) {
- printf("cc_stopService() failed\n");
- exit(1);
- }
- } else if (!strcmp(argv[2], "enableService")) {
- rc = cc_enableService(env, stub);
- if (rc != 0) {
- printf("cc_enableService() failed\n");
- exit(1);
- }
- } else if (!strcmp(argv[2], "disableService")) {
- rc = cc_disableService(env, stub);
- if (rc != 0) {
- printf("cc_disableService() failed\n");
- exit(1);
- }
- } else if (!strcmp(argv[2], "shutdownService")) {
- rc = cc_shutdownService(env, stub);
- if (rc != 0) {
- printf("cc_shutdownService() failed\n");
- exit(1);
- }
- } else if (!strcmp(argv[2], "getConsoleOutput")) {
- rc = cc_getConsoleOutput(argv[3], env, stub);
- if (rc != 0) {
- printf("cc_getConsoleOutput() failed\n");
- exit(1);
- }
- } else if (!strcmp(argv[2], "rebootInstances")) {
- char *instIds[256];
- if (argv[3] != NULL) {
- instIds[0] = strdup(argv[3]);
- }
- rc = cc_rebootInstances(instIds, 1, env, stub);
- if (rc != 0) {
- printf("cc_rebootInstances() failed\n");
- exit(1);
- }
- } else if (!strcmp(argv[2], "terminateInstances")) {
- char *instIds[256];
- i=3;
- while (argv[i] != NULL) {
- instIds[i-3] = strdup(argv[i]);
- i++;
- }
- if ( (i-3) > 0) {
- rc = cc_terminateInstances(instIds, i-3, env, stub);
- if (rc != 0) {
- printf("cc_terminateInstances() failed\n");
- exit(1);
+ rc = get_conf_var(configFile, "CC_PORT", &tmpstr);
+ if (rc != 1) {
+ // error
+ logprintf("ERROR: parsing config file (%s) for CC_PORT\n",configFile);
+ exit(1);
+ } else {
+ port = atoi(tmpstr);
}
- }
- } else if (!strcmp(argv[2], "describeResources")) {
- rc = cc_describeResources(env, stub);
- if (rc != 0) {
- printf("cc_describeResources() failed\n");
- exit(1);
- }
- } else if (!strcmp(argv[2], "startNetwork")) {
- char **ccs;
- int ccsLen=0, i;
- ccs = malloc(sizeof(char *) * 32);
- for (i=0; i<32; i++) {
- if (argv[i+5]) {
- ccs[i] = strdup(argv[i+5]);
- ccsLen++;
+
+ rc = get_conf_var(configFile, "ENABLE_WS_SECURITY", &tmpstr);
+ if (rc != 1) {
+ /* Default to enabled */
+ use_wssec = 1;
} else {
- i=33;
+ if (!strcmp(tmpstr, "Y")) {
+ use_wssec = 1;
+ } else {
+ use_wssec = 0;
+ }
}
- }
- rc = cc_startNetwork(atoi(argv[3]), argv[4], ccs, ccsLen, env, stub);
- if (rc != 0) {
- printf("cc_startNetwork() failed\n");
- exit(1);
- }
- } else if (!strcmp(argv[2], "describeNetworks")) {
- char **ccs, *nameserver;
- int ccsLen=0, i;
- ccs = malloc(sizeof(char *) * 32);
- for (i=0; i<32; i++) {
- if (argv[i+3]) {
- ccs[i] = strdup(argv[i+3]);
- ccsLen++;
+
+ if (MODE == 0) {
+ snprintf(endpoint_uri, 256,"http://localhost:%d/axis2/services/EucalyptusCC", port);
} else {
- i=33;
+ snprintf(endpoint_uri, 256,"http://%s/axis2/services/EucalyptusCC", argv[1]);
+ }
+ //env = axutil_env_create_all(NULL, 0);
+ env = axutil_env_create_all("/tmp/fofo", AXIS2_LOG_LEVEL_TRACE);
+
+ client_home = AXIS2_GETENV("AXIS2C_HOME");
+ if (!client_home) {
+ printf("must have AXIS2C_HOME set\n");
+ exit(1);
}
- }
- nameserver = strdup("1.2.3.4");
+ stub = axis2_stub_create_EucalyptusCC(env, client_home, endpoint_uri);
- rc = cc_describeNetworks(nameserver, ccs, ccsLen, env, stub);
- if (rc != 0) {
- printf("cc_describeNetworks() failed\n");
- exit(1);
- }
- } else if (!strcmp(argv[2], "configureNetwork")) {
- rc = cc_configureNetwork(argv[3], argv[4], argv[5], atoi(argv[6]), atoi(argv[7]), argv[8], env, stub);
- if (rc != 0) {
- printf("cc_configureNetwork() failed\n");
- exit(1);
- }
- } else if (!strcmp(argv[2], "stopNetwork")) {
- rc = cc_stopNetwork(atoi(argv[3]), argv[4], env, stub);
- if (rc != 0) {
- printf("cc_stopNetwork() failed\n");
- exit(1);
- }
- } else if (!strcmp(argv[2], "assignAddress")) {
- rc = cc_assignAddress(argv[3], argv[4], env, stub);
- if (rc != 0) {
- printf("cc_assignNetwork() failed\n");
- exit(1);
- }
- } else if (!strcmp(argv[2], "unassignAddress")) {
- rc = cc_unassignAddress(argv[3], argv[4], env, stub);
- if (rc != 0) {
- printf("cc_unassignNetwork() failed\n");
- exit(1);
- }
- } else if (!strcmp(argv[2], "attachVolume")) {
- rc = cc_attachVolume(argv[3], argv[4], argv[5], argv[6], env, stub);
- if (rc != 0) {
- printf("cc_attachVolume() failed\n");
- exit(1);
- }
- } else if (!strcmp(argv[2], "detachVolume")) {
- rc = cc_detachVolume(argv[3], argv[4], argv[5], argv[6], atoi(argv[7]), env, stub);
- if (rc != 0) {
- printf("cc_unassignNetwork() failed\n");
- exit(1);
- }
- } else if (!strcmp(argv[2], "bundleInstance")) {
- rc = cc_bundleInstance(argv[3], argv[4], argv[5], argv[6], argv[7], env, stub);
- if (rc != 0) {
- printf("cc_bundleInstance() failed\n");
- exit(1);
- }
- } else if (!strcmp(argv[2], "createImage")) {
- rc = cc_createImage(argv[3], argv[4], argv[5], env, stub);
- if (rc != 0) {
- printf("cc_createImage() failed\n");
- exit(1);
- }
- } else if (!strcmp(argv[2], "describePublicAddresses")) {
- rc = cc_describePublicAddresses(env, stub);
- if (rc != 0) {
- printf("cc_describePublicAddresses() failed\n");
- exit(1);
- }
- } else if (!strcmp(argv[2], "killallInstances")) {
- rc = cc_killallInstances(env, stub);
- if (rc != 0) {
- printf("cc_killallInstances() failed\n");
- exit(1);
- }
- } else if (!strcmp(argv[2], "describeSensors")) {
- sensorResource ** res;
- int resSize;
+ if (use_wssec) {
+ rc = InitWSSEC(env, stub, policyFile);
+ if (rc) {
+ printf("cannot initialize WS-SEC policy (%s)\n",policyFile);
+ exit(1);
+ }
+ }
+
+ if (MODE == 0) {
+ rc = cc_killallInstances(env, stub);
+ if (rc != 0) {
+ printf("cc_killallInstances() failed\n");
+ exit(1);
+ }
+ } else {
+ /*
+ if (!strcmp(argv[2], "registerImage")) {
+ rc = cc_registerImage(argv[3], env, stub);
+ if (rc != 0) {
+ printf("cc_registerImage() failed: in:%s out:%d\n", argv[3], rc);
+ exit(1);
+ }
+ }
+ */
+ if (!strcmp(argv[2], "runInstances")) {
+ char *amiId=NULL, *amiURL=NULL, *kernelId=NULL, *kernelURL=NULL, *ramdiskId=NULL, *ramdiskURL=NULL;
+ if (argv[3]) amiId = argv[3];
+ if (argv[4]) amiURL = argv[4];
+ if (argv[5]) kernelId = argv[5];
+ if (argv[6]) kernelURL = argv[6];
+ if (argv[10]) ramdiskId = argv[10];
+ if (argv[11]) ramdiskURL = argv[11];
+
+ virtualMachine params = { 64, 1, 64, "m1.small" };
+
+ rc = cc_runInstances(amiId, amiURL, kernelId, kernelURL, ramdiskId, ramdiskURL, atoi(argv[7]), atoi(argv[8]), argv[9], &params, env, stub);
+ if (rc != 0) {
+ printf("cc_runInstances() failed: in:%s out:%d\n", argv[4], rc);
+ exit(1);
+ }
+ } else if (!strcmp(argv[2], "describeInstances")) {
+ rc = cc_describeInstances(NULL, 0, env, stub);
+ if (rc != 0) {
+ printf("cc_describeInstances() failed\n");
+ exit(1);
+ }
+ } else if (!strcmp(argv[2], "describeServices")) {
+ rc = cc_describeServices(env, stub);
+ if (rc != 0) {
+ printf("cc_describeServices() failed\n");
+ exit(1);
+ }
+ } else if (!strcmp(argv[2], "startService")) {
+ rc = cc_startService(env, stub);
+ if (rc != 0) {
+ printf("cc_startService() failed\n");
+ exit(1);
+ }
+ } else if (!strcmp(argv[2], "stopService")) {
+ rc = cc_stopService(env, stub);
+ if (rc != 0) {
+ printf("cc_stopService() failed\n");
+ exit(1);
+ }
+ } else if (!strcmp(argv[2], "enableService")) {
+ rc = cc_enableService(env, stub);
+ if (rc != 0) {
+ printf("cc_enableService() failed\n");
+ exit(1);
+ }
+ } else if (!strcmp(argv[2], "disableService")) {
+ rc = cc_disableService(env, stub);
+ if (rc != 0) {
+ printf("cc_disableService() failed\n");
+ exit(1);
+ }
+ } else if (!strcmp(argv[2], "shutdownService")) {
+ rc = cc_shutdownService(env, stub);
+ if (rc != 0) {
+ printf("cc_shutdownService() failed\n");
+ exit(1);
+ }
+ } else if (!strcmp(argv[2], "getConsoleOutput")) {
+ rc = cc_getConsoleOutput(argv[3], env, stub);
+ if (rc != 0) {
+ printf("cc_getConsoleOutput() failed\n");
+ exit(1);
+ }
+ } else if (!strcmp(argv[2], "rebootInstances")) {
+ char *instIds[256];
+ if (argv[3] != NULL) {
+ instIds[0] = strdup(argv[3]);
+ }
+ rc = cc_rebootInstances(instIds, 1, env, stub);
+ if (rc != 0) {
+ printf("cc_rebootInstances() failed\n");
+ exit(1);
+ }
+ } else if (!strcmp(argv[2], "terminateInstances")) {
+ char *instIds[256];
+ i=3;
+ while (argv[i] != NULL) {
+ instIds[i-3] = strdup(argv[i]);
+ i++;
+ }
+ if ( (i-3) > 0) {
+ rc = cc_terminateInstances(instIds, i-3, env, stub);
+ if (rc != 0) {
+ printf("cc_terminateInstances() failed\n");
+ exit(1);
+ }
+ }
+ } else if (!strcmp(argv[2], "describeResources")) {
+ rc = cc_describeResources(env, stub);
+ if (rc != 0) {
+ printf("cc_describeResources() failed\n");
+ exit(1);
+ }
+ } else if (!strcmp(argv[2], "startNetwork")) {
+ char **ccs;
+ int ccsLen=0, i;
+ ccs = malloc(sizeof(char *) * 32);
+ for (i=0; i<32; i++) {
+ if (argv[i+5]) {
+ ccs[i] = strdup(argv[i+5]);
+ ccsLen++;
+ } else {
+ i=33;
+ }
+ }
+ rc = cc_startNetwork(atoi(argv[3]), argv[4], ccs, ccsLen, env, stub);
+ if (rc != 0) {
+ printf("cc_startNetwork() failed\n");
+ exit(1);
+ }
+ } else if (!strcmp(argv[2], "describeNetworks")) {
+ char **ccs, *nameserver;
+ int ccsLen=0, i;
+ ccs = malloc(sizeof(char *) * 32);
+ for (i=0; i<32; i++) {
+ if (argv[i+3]) {
+ ccs[i] = strdup(argv[i+3]);
+ ccsLen++;
+ } else {
+ i=33;
+ }
+ }
+ nameserver = strdup("1.2.3.4");
+
+ rc = cc_describeNetworks(nameserver, ccs, ccsLen, env, stub);
+ if (rc != 0) {
+ printf("cc_describeNetworks() failed\n");
+ exit(1);
+ }
+ } else if (!strcmp(argv[2], "configureNetwork")) {
+ rc = cc_configureNetwork(argv[3], argv[4], argv[5], atoi(argv[6]), atoi(argv[7]), argv[8], env, stub);
+ if (rc != 0) {
+ printf("cc_configureNetwork() failed\n");
+ exit(1);
+ }
+ } else if (!strcmp(argv[2], "stopNetwork")) {
+ rc = cc_stopNetwork(atoi(argv[3]), argv[4], env, stub);
+ if (rc != 0) {
+ printf("cc_stopNetwork() failed\n");
+ exit(1);
+ }
+ } else if (!strcmp(argv[2], "assignAddress")) {
+ rc = cc_assignAddress(argv[3], argv[4], env, stub);
+ if (rc != 0) {
+ printf("cc_assignNetwork() failed\n");
+ exit(1);
+ }
+ } else if (!strcmp(argv[2], "unassignAddress")) {
+ rc = cc_unassignAddress(argv[3], argv[4], env, stub);
+ if (rc != 0) {
+ printf("cc_unassignNetwork() failed\n");
+ exit(1);
+ }
+ } else if (!strcmp(argv[2], "attachVolume")) {
+ rc = cc_attachVolume(argv[3], argv[4], argv[5], argv[6], env, stub);
+ if (rc != 0) {
+ printf("cc_attachVolume() failed\n");
+ exit(1);
+ }
+ } else if (!strcmp(argv[2], "detachVolume")) {
+ rc = cc_detachVolume(argv[3], argv[4], argv[5], argv[6], atoi(argv[7]), env, stub);
+ if (rc != 0) {
+ printf("cc_unassignNetwork() failed\n");
+ exit(1);
+ }
+ } else if (!strcmp(argv[2], "bundleInstance")) {
+ rc = cc_bundleInstance(argv[3], argv[4], argv[5], argv[6], argv[7], env, stub);
+ if (rc != 0) {
+ printf("cc_bundleInstance() failed\n");
+ exit(1);
+ }
+ } else if (!strcmp(argv[2], "bundleRestartInstance")) {
+ rc = cc_bundleRestartInstance(argv[3], env, stub);
+ if (rc != 0) {
+ printf("cc_bundleRestartInstance() failed\n");
+ exit(1);
+ }
+ } else if (!strcmp(argv[2], "createImage")) {
+ rc = cc_createImage(argv[3], argv[4], argv[5], env, stub);
+ if (rc != 0) {
+ printf("cc_createImage() failed\n");
+ exit(1);
+ }
+ } else if (!strcmp(argv[2], "describePublicAddresses")) {
+ rc = cc_describePublicAddresses(env, stub);
+ if (rc != 0) {
+ printf("cc_describePublicAddresses() failed\n");
+ exit(1);
+ }
+ } else if (!strcmp(argv[2], "killallInstances")) {
+ rc = cc_killallInstances(env, stub);
+ if (rc != 0) {
+ printf("cc_killallInstances() failed\n");
+ exit(1);
+ }
+ } else if (!strcmp(argv[2], "describeSensors")) {
+ sensorResource ** res;
+ int resSize;
+
+ rc = cc_describeSensors(20, 5000, NULL, 0, NULL, 0, &res, &resSize, env, stub);
+ if (rc != 0) {
+ printf("cc_describeSensors() failed: error=%d\n", rc);
+ exit(1);
+ }
+ char buf [10240];
+ sensor_res2str (buf, sizeof(buf), res, resSize);
+ printf ("resources: %d\n%s\n", resSize, buf);
+ } else {
+ printf("unrecognized operation '%s'\n", argv[2]);
+ exit(1);
+ }
+ }
- rc = cc_describeSensors(20, 5000, NULL, 0, NULL, 0, &res, &resSize, env, stub);
- if (rc != 0) {
- printf("cc_describeSensors() failed: error=%d\n", rc);
- exit(1);
- }
- char buf [10240];
- sensor_res2str (buf, sizeof(buf), res, resSize);
- printf ("resources: %d\n%s\n", resSize, buf);
- } else {
- printf("unrecognized operation '%s'\n", argv[2]);
- exit(1);
- }
- }
-
- exit(0);
+ exit(0);
}
View
45 cluster/cc-client-marshal-adb.c
@@ -570,6 +570,45 @@ int cc_bundleInstance(char *instanceId, char *bucketName, char *filePrefix, char
return(0);
}
+int cc_bundleRestartInstance(char *instanceId, axutil_env_t *env, axis2_stub_t *stub) {
+ int i = 0;
+ adb_BundleRestartInstance_t *input = NULL;
+ adb_BundleRestartInstanceResponse_t *output = NULL;
+ adb_bundleRestartInstanceType_t *sn = NULL;
+ adb_bundleRestartInstanceResponseType_t *snrt = NULL;
+
+ sn = adb_bundleRestartInstanceType_create(env);
+ input = adb_BundleRestartInstance_create(env);
+
+ adb_bundleRestartInstanceType_set_userId(sn, env, "eucalyptus");
+ {
+ char cidstr[9] = { 0 };
+
+ bzero(cidstr, 9);
+ srand(time(NULL) + getpid());
+
+ for (i = 0; i < 8; i++) {
+ cidstr[i] = rand() % 26 + 'a';
+ }
+
+ adb_bundleRestartInstanceType_set_correlationId(sn, env, cidstr);
+ }
+ adb_bundleRestartInstanceType_set_instanceId(sn, env, instanceId);
+ adb_BundleRestartInstance_set_BundleRestartInstance(input, env, sn);
+
+ if ((output = axis2_stub_op_EucalyptusCC_BundleRestartInstance(stub, env, input)) == NULL) {
+ printf("ERROR: bundleRestartInstance returned NULL\n");
+ return(1);
+ }
+
+ snrt = adb_BundleRestartInstanceResponse_get_BundleRestartInstanceResponse(output, env);
+ printf("bundleRestartInstance returned status %d\n", adb_bundleRestartInstanceResponseType_get_return(snrt, env));
+
+ snrt = adb_BundleRestartInstanceResponse_get_BundleRestartInstanceResponse(output, env);
+ printf("bundleRestartInstance returned status %d\n", adb_bundleRestartInstanceResponseType_get_return(snrt, env));
+ return(0);
+}
+
int cc_assignAddress(char *src, char *dst, axutil_env_t *env, axis2_stub_t *stub) {
int i;
// char meh[32];
@@ -1267,22 +1306,22 @@ int cc_describeSensors (int historySize, long long collectionIntervalTimeMs, cha
adb_DescribeSensorsResponse_t * output = axis2_stub_op_EucalyptusCC_DescribeSensors (stub, env, input);
if (!output) {
- logprintfl (EUCAERROR, "ERROR: DescribeSensors could not be invoked\n");
+ logprintfl (EUCAERROR, "DescribeSensors could not be invoked\n");
status = -1;
} else {
adb_describeSensorsResponseType_t * response = adb_DescribeSensorsResponse_get_DescribeSensorsResponse (output, env);
if ( adb_describeSensorsResponseType_get_return(response, env) == AXIS2_FALSE ) {
- logprintfl (EUCAERROR, "ERROR: DescribeSensors returned an error\n");
+ logprintfl (EUCAERROR, "DescribeSensors returned an error\n");
status = 1;
}
* outResourcesLen = adb_describeSensorsResponseType_sizeof_sensorsResources(response, env);
if (* outResourcesLen) {
* outResources = malloc (sizeof(sensorResource *) * *outResourcesLen);
if ( * outResources == NULL ) {
- logprintfl (EUCAERROR, "ERROR: out of memory in ncDescribeSensorsStub()\n");
+ logprintfl (EUCAERROR, "out of memory\n");
* outResourcesLen = 0;
status = 2;
} else {
View
1 cluster/cc-client-marshal.h
@@ -82,6 +82,7 @@ int cc_attachVolume(char *volumeId, char *instanceId, char *remoteDev, char *loc
int cc_detachVolume(char *volumeId, char *instanceId, char *remoteDev, char *localDev, int force, axutil_env_t *env, axis2_stub_t *stub);
int cc_bundleInstance(char *instanceId, char *bucketName, char *filePrefix, char *walrusURL, char *userPublicKey, axutil_env_t *env, axis2_stub_t *stub);
+int cc_bundleRestartInstance(char *instanceId, axutil_env_t *env, axis2_stub_t *stub);
int cc_createImage(char *volumeId, char *instanceId, char *remoteDev, axutil_env_t *env, axis2_stub_t *stub);
int cc_describeSensors (int historySize, long long collectionIntervalTimeMs, char **instIds, int instIdsLen, char **sensorIds, int sensorIdsLen, sensorResource ***outResources, int *outResourcesLen, axutil_env_t *env, axis2_stub_t *stub);
View
128 cluster/handlers-state.c
@@ -105,8 +105,8 @@ int doDescribeServices(ncMetadata *ccMeta, serviceInfoType *serviceIds, int serv
return(1);
}
- logprintfl(EUCAINFO, "DescribeServices(): called\n");
- logprintfl(EUCADEBUG, "DescribeServices(): params: userId=%s, serviceIdsLen=%d\n", SP(ccMeta ? ccMeta->userId : "UNSET"), serviceIdsLen);
+ logprintfl(EUCAINFO, "invoked\n");
+ logprintfl(EUCADEBUG, "params: userId=%s, serviceIdsLen=%d\n", SP(ccMeta ? ccMeta->userId : "UNSET"), serviceIdsLen);
// TODO: for now, return error if list of services is passed in as parameter
/*
@@ -120,15 +120,15 @@ int doDescribeServices(ncMetadata *ccMeta, serviceInfoType *serviceIds, int serv
sem_mywait(CONFIG);
if (!strcmp(config->ccStatus.serviceId.name, "self")) {
for (i=0; i<serviceIdsLen; i++) {
- logprintfl(EUCADEBUG, "DescribeServices(): received input serviceId[%d]\n", i);
+ logprintfl(EUCADEBUG, "received input serviceId[%d]\n", i);
if (strlen(serviceIds[i].type)) {
if (!strcmp(serviceIds[i].type, "cluster")) {
char uri[MAX_PATH], uriType[32], host[MAX_PATH], path[MAX_PATH];
int port;
snprintf(uri, MAX_PATH, "%s", serviceIds[i].uris[0]);
rc = tokenize_uri(uri, uriType, host, &port, path);
if (strlen(host)) {
- logprintfl(EUCADEBUG, "DescribeServices(): setting local serviceId to input serviceId (type=%s name=%s partition=%s)\n", SP(serviceIds[i].type), SP(serviceIds[i].name), SP(serviceIds[i].partition));
+ logprintfl(EUCADEBUG, "setting local serviceId to input serviceId (type=%s name=%s partition=%s)\n", SP(serviceIds[i].type), SP(serviceIds[i].name), SP(serviceIds[i].partition));
memcpy(&(config->ccStatus.serviceId), &(serviceIds[i]), sizeof(serviceInfoType));
}
}
@@ -140,10 +140,10 @@ int doDescribeServices(ncMetadata *ccMeta, serviceInfoType *serviceIds, int serv
for (i=0; i<16; i++) {
int j;
if (strlen(config->services[i].type)) {
- logprintfl(EUCADEBUG, "DescribeServices(): internal serviceInfos type=%s name=%s partition=%s urisLen=%d\n", config->services[i].type, config->services[i].name, config->services[i].partition, config->services[i].urisLen);
+ logprintfl(EUCADEBUG, "internal serviceInfos type=%s name=%s partition=%s urisLen=%d\n", config->services[i].type, config->services[i].name, config->services[i].partition, config->services[i].urisLen);
for (j=0; j<8; j++) {
if (strlen(config->services[i].uris[j])) {
- logprintfl(EUCADEBUG, "DescribeServices(): internal serviceInfos\t uri[%d]:%s\n", j, config->services[i].uris[j]);
+ logprintfl(EUCADEBUG, "internal serviceInfos\t uri[%d]:%s\n", j, config->services[i].uris[j]);
}
}
}
@@ -152,10 +152,10 @@ int doDescribeServices(ncMetadata *ccMeta, serviceInfoType *serviceIds, int serv
for (i=0; i<16; i++) {
int j;
if (strlen(config->disabledServices[i].type)) {
- logprintfl(EUCADEBUG, "DescribeServices(): internal disabled serviceInfos type=%s name=%s partition=%s urisLen=%d\n", config->disabledServices[i].type, config->disabledServices[i].name, config->disabledServices[i].partition, config->disabledServices[i].urisLen);
+ logprintfl(EUCADEBUG, "internal disabled serviceInfos type=%s name=%s partition=%s urisLen=%d\n", config->disabledServices[i].type, config->disabledServices[i].name, config->disabledServices[i].partition, config->disabledServices[i].urisLen);
for (j=0; j<8; j++) {
if (strlen(config->disabledServices[i].uris[j])) {
- logprintfl(EUCADEBUG, "DescribeServices(): internal disabled serviceInfos\t uri[%d]:%s\n", j, config->disabledServices[i].uris[j]);
+ logprintfl(EUCADEBUG, "internal disabled serviceInfos\t uri[%d]:%s\n", j, config->disabledServices[i].uris[j]);
}
}
}
@@ -164,10 +164,10 @@ int doDescribeServices(ncMetadata *ccMeta, serviceInfoType *serviceIds, int serv
for (i=0; i<16; i++) {
int j;
if (strlen(config->notreadyServices[i].type)) {
- logprintfl(EUCADEBUG, "DescribeServices(): internal not ready serviceInfos type=%s name=%s partition=%s urisLen=%d\n", config->notreadyServices[i].type, config->notreadyServices[i].name, config->notreadyServices[i].partition, config->notreadyServices[i].urisLen);
+ logprintfl(EUCADEBUG, "internal not ready serviceInfos type=%s name=%s partition=%s urisLen=%d\n", config->notreadyServices[i].type, config->notreadyServices[i].name, config->notreadyServices[i].partition, config->notreadyServices[i].urisLen);
for (j=0; j<8; j++) {
if (strlen(config->notreadyServices[i].uris[j])) {
- logprintfl(EUCADEBUG, "DescribeServices(): internal not ready serviceInfos\t uri[%d]:%s\n", j, config->notreadyServices[i].uris[j]);
+ logprintfl(EUCADEBUG, "internal not ready serviceInfos\t uri[%d]:%s\n", j, config->notreadyServices[i].uris[j]);
}
}
}
@@ -176,7 +176,7 @@ int doDescribeServices(ncMetadata *ccMeta, serviceInfoType *serviceIds, int serv
*outStatusesLen = 1;
*outStatuses = malloc(sizeof(serviceStatusType));
if (!*outStatuses) {
- logprintfl(EUCAFATAL, "DescribeServices(): out of memory!\n");
+ logprintfl(EUCAFATAL, "out of memory!\n");
unlock_exit(1);
}
@@ -186,7 +186,7 @@ int doDescribeServices(ncMetadata *ccMeta, serviceInfoType *serviceIds, int serv
myStatus->localEpoch = config->ccStatus.localEpoch;
memcpy(&(myStatus->serviceId), &(config->ccStatus.serviceId), sizeof(serviceInfoType));
- logprintfl(EUCAINFO, "DescribeServices(): done\n");
+ logprintfl(EUCAINFO, "done\n");
return(0);
}
@@ -198,26 +198,26 @@ int doStartService(ncMetadata *ccMeta) {
return(1);
}
- logprintfl(EUCAINFO, "StartService(): called\n");
- logprintfl(EUCADEBUG, "StartService(): params: userId=%s\n", SP(ccMeta ? ccMeta->userId : "UNSET"));
+ logprintfl(EUCAINFO, "invoked\n");
+ logprintfl(EUCADEBUG, "params: userId=%s\n", SP(ccMeta ? ccMeta->userId : "UNSET"));
// this is actually a NOP
sem_mywait(CONFIG);
if (config->ccState == SHUTDOWNCC) {
- logprintfl(EUCAWARN, "StartService(): attempt to start a shutdown CC, skipping.\n");
+ logprintfl(EUCAWARN, "attempt to start a shutdown CC, skipping.\n");
ret++;
} else if (ccCheckState(0)) {
- logprintfl(EUCAWARN, "StartService(): ccCheckState() returned failures, skipping.\n");
+ logprintfl(EUCAWARN, "ccCheckState() returned failures, skipping.\n");
ret++;
} else {
- logprintfl(EUCADEBUG, "StartService(): starting service\n");
+ logprintfl(EUCADEBUG, "starting service\n");
ret=0;
config->kick_enabled = 0;
ccChangeState(DISABLED);
}
sem_mypost(CONFIG);
- logprintfl(EUCAINFO, "StartService(): done\n");
+ logprintfl(EUCAINFO, "done\n");
return(ret);
}
@@ -230,25 +230,25 @@ int doStopService(ncMetadata *ccMeta) {
return(1);
}
- logprintfl(EUCAINFO, "StopService(): called\n");
- logprintfl(EUCADEBUG, "StopService(): params: userId=%s\n", SP(ccMeta ? ccMeta->userId : "UNSET"));
+ logprintfl(EUCAINFO, "invoked\n");
+ logprintfl(EUCADEBUG, "params: userId=%s\n", SP(ccMeta ? ccMeta->userId : "UNSET"));
sem_mywait(CONFIG);
if (config->ccState == SHUTDOWNCC) {
- logprintfl(EUCAWARN, "StopService(): attempt to stop a shutdown CC, skipping.\n");
+ logprintfl(EUCAWARN, "attempt to stop a shutdown CC, skipping.\n");
ret++;
} else if (ccCheckState(0)) {
- logprintfl(EUCAWARN, "StopService(): ccCheckState() returned failures, skipping.\n");
+ logprintfl(EUCAWARN, "ccCheckState() returned failures, skipping.\n");
ret++;
} else {
- logprintfl(EUCADEBUG, "StopService(): stopping service\n");
+ logprintfl(EUCADEBUG, "stopping service\n");
ret=0;
config->kick_enabled = 0;
ccChangeState(STOPPED);
}
sem_mypost(CONFIG);
- logprintfl(EUCAINFO, "StopService(): done\n");
+ logprintfl(EUCAINFO, "done\n");
return(ret);
}
@@ -261,18 +261,18 @@ int doEnableService(ncMetadata *ccMeta) {
return(1);
}
- logprintfl(EUCAINFO, "EnableService(): called\n");
- logprintfl(EUCADEBUG, "EnableService(): params: userId=%s\n", SP(ccMeta ? ccMeta->userId : "UNSET"));
+ logprintfl(EUCAINFO, "invoked\n");
+ logprintfl(EUCADEBUG, "params: userId=%s\n", SP(ccMeta ? ccMeta->userId : "UNSET"));
sem_mywait(CONFIG);
if (config->ccState == SHUTDOWNCC) {
- logprintfl(EUCAWARN, "EnableService(): attempt to enable a shutdown CC, skipping.\n");
+ logprintfl(EUCAWARN, "attempt to enable a shutdown CC, skipping.\n");
ret++;
} else if (ccCheckState(0)) {
- logprintfl(EUCAWARN, "EnableService(): ccCheckState() returned failures, skipping.\n");
+ logprintfl(EUCAWARN, "ccCheckState() returned failures, skipping.\n");
ret++;
} else if (config->ccState != ENABLED) {
- logprintfl(EUCADEBUG, "EnableService(): enabling service\n");
+ logprintfl(EUCADEBUG, "enabling service\n");
ret=0;
// tell monitor thread to (re)enable
config->kick_monitor_running = 0;
@@ -293,13 +293,13 @@ int doEnableService(ncMetadata *ccMeta) {
}
sem_mypost(CONFIG);
if (!done) {
- logprintfl(EUCADEBUG, "EnableService(): waiting for monitor to re-initialize (%d/60)\n", i);
+ logprintfl(EUCADEBUG, "waiting for monitor to re-initialize (%d/60)\n", i);
sleep(1);
}
}
}
- logprintfl(EUCAINFO, "EnableService(): done\n");
+ logprintfl(EUCAINFO, "done\n");
return(ret);
}
@@ -312,25 +312,25 @@ int doDisableService(ncMetadata *ccMeta) {
return(1);
}
- logprintfl(EUCAINFO, "DisableService(): called\n");
- logprintfl(EUCADEBUG, "DisableService(): params: userId=%s\n", SP(ccMeta ? ccMeta->userId : "UNSET"));
+ logprintfl(EUCAINFO, "invoked\n");
+ logprintfl(EUCADEBUG, "params: userId=%s\n", SP(ccMeta ? ccMeta->userId : "UNSET"));
sem_mywait(CONFIG);
if (config->ccState == SHUTDOWNCC) {
- logprintfl(EUCAWARN, "DisableService(): attempt to disable a shutdown CC, skipping.\n");
+ logprintfl(EUCAWARN, "attempt to disable a shutdown CC, skipping.\n");
ret++;
} else if (ccCheckState(0)) {
- logprintfl(EUCAWARN, "DisableService(): ccCheckState() returned failures, skipping.\n");
+ logprintfl(EUCAWARN, "ccCheckState() returned failures, skipping.\n");
ret++;
} else {
- logprintfl(EUCADEBUG, "DisableService(): disabling service\n");
+ logprintfl(EUCADEBUG, "disabling service\n");
ret=0;
config->kick_enabled = 0;
ccChangeState(DISABLED);
}
sem_mypost(CONFIG);
- logprintfl(EUCAINFO, "DisableService(): done\n");
+ logprintfl(EUCAINFO, "done\n");
return(ret);
}
@@ -343,15 +343,15 @@ int doShutdownService(ncMetadata *ccMeta) {
return(1);
}
- logprintfl(EUCAINFO, "ShutdownService(): called\n");
- logprintfl(EUCADEBUG, "ShutdownService(): params: userId=%s\n", SP(ccMeta ? ccMeta->userId : "UNSET"));
+ logprintfl(EUCAINFO, "invoked\n");
+ logprintfl(EUCADEBUG, "params: userId=%s\n", SP(ccMeta ? ccMeta->userId : "UNSET"));
sem_mywait(CONFIG);
config->kick_enabled = 0;
ccChangeState(SHUTDOWNCC);
sem_mypost(CONFIG);
- logprintfl(EUCAINFO, "ShutdownService(): done\n");
+ logprintfl(EUCAINFO, "done\n");
return(ret);
}
@@ -383,11 +383,11 @@ int instIpSync(ccInstance *inst, void *in) {
return(0);
}
- logprintfl(EUCADEBUG, "instIpSync(): instanceId=%s CCpublicIp=%s CCprivateIp=%s CCprivateMac=%s CCvlan=%d CCnetworkIndex=%d NCpublicIp=%s NCprivateIp=%s NCprivateMac=%s NCvlan=%d NCnetworkIndex=%d\n", inst->instanceId, inst->ccnet.publicIp, inst->ccnet.privateIp, inst->ccnet.privateMac, inst->ccnet.vlan, inst->ccnet.networkIndex, inst->ncnet.publicIp, inst->ncnet.privateIp, inst->ncnet.privateMac, inst->ncnet.vlan, inst->ncnet.networkIndex);
+ logprintfl(EUCADEBUG, "instanceId=%s CCpublicIp=%s CCprivateIp=%s CCprivateMac=%s CCvlan=%d CCnetworkIndex=%d NCpublicIp=%s NCprivateIp=%s NCprivateMac=%s NCvlan=%d NCnetworkIndex=%d\n", inst->instanceId, inst->ccnet.publicIp, inst->ccnet.privateIp, inst->ccnet.privateMac, inst->ccnet.vlan, inst->ccnet.networkIndex, inst->ncnet.publicIp, inst->ncnet.privateIp, inst->ncnet.privateMac, inst->ncnet.vlan, inst->ncnet.networkIndex);
if (inst->ccnet.vlan == 0 && inst->ccnet.networkIndex == 0 && inst->ccnet.publicIp[0] == '\0' && inst->ccnet.privateIp[0] == '\0' && inst->ccnet.privateMac[0] == '\0') {
// ccnet is completely empty, make a copy of ncnet
- logprintfl(EUCADEBUG, "instIpSync(): ccnet is empty, copying ncnet\n");
+ logprintfl(EUCADEBUG, "ccnet is empty, copying ncnet\n");
memcpy(&(inst->ccnet), &(inst->ncnet), sizeof(netConfig));
return(1);
}
@@ -405,40 +405,40 @@ int instIpSync(ccInstance *inst, void *in) {
// - do nothing
if ((inst->ccnet.publicIp[0] == '\0' || !strcmp(inst->ccnet.publicIp, "0