Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add a few more cases where CC re-constructs network state properly

  • Loading branch information...
commit 86c23ecd9b4dfef988f8bda47c223fed30b3721f 1 parent 5710c2a
root authored
View
16 cluster/handlers-state.c
@@ -284,6 +284,10 @@ int instIpSync(ccInstance *inst, void *in) {
logprintfl(EUCAERROR, "instIpSync(): CC and NC vlans differ instanceId=%s CCvlan=%d NCvlan=%d\n", inst->instanceId, inst->ccnet.vlan, inst->ncnet.vlan);
}
inst->ccnet.vlan = inst->ncnet.vlan;
+ if (!vnetconfig->networks[inst->ccnet.vlan].active) {
+ logprintfl(EUCAWARN, "instIpSync(): detected instance from NC that is running in a currently inactive network; will attempt to re-activate network '%d'\n", inst->ccnet.vlan);
+ ret++;
+ }
// networkIndex cases
if (inst->ccnet.networkIndex != inst->ncnet.networkIndex) {
@@ -364,10 +368,14 @@ int instNetReassignAddrs(ccInstance *inst, void *in) {
}
logprintfl(EUCADEBUG, "instNetReassignAddrs(): instanceId=%s publicIp=%s privateIp=%s\n", inst->instanceId, inst->ccnet.publicIp, inst->ccnet.privateIp);
- rc = vnetReassignAddress(vnetconfig, "UNSET", inst->ccnet.publicIp, inst->ccnet.privateIp);
- if (rc) {
- logprintfl(EUCAERROR, "instNetReassignAddrs(): cannot reassign address\n");
- ret = 1;
+ if (!strcmp(inst->ccnet.publicIp, "0.0.0.0") || !strcmp(inst->ccnet.privateIp, "0.0.0.0")) {
+ logprintfl(EUCAWARN, "instNetReassignAddrs(): ignoring instance with unset publicIp/privateIp\n");
+ } else {
+ rc = vnetReassignAddress(vnetconfig, "UNSET", inst->ccnet.publicIp, inst->ccnet.privateIp);
+ if (rc) {
+ logprintfl(EUCAERROR, "instNetReassignAddrs(): cannot reassign address\n");
+ ret = 1;
+ }
}
return(0);
View
17 devel/running-ccclient.readme
@@ -0,0 +1,17 @@
+to run the CCClient program, the steps are:
+
+1.) log into the CC machine (need built source tree available)
+2.) set up environment (EUCALYTPUS, AXIS2C_HOME, LD_LIBRARY_PATH)
+3.) run the program (CCClient) with some arguments
+
+For example, in the typical /opt/eucalyptus case (QA)
+
+export EUCALYPTUS=/opt/eucalyptus
+export AXIS2C_HOME=$EUCALYPTUS/packages/axis2c-1.6.0
+export LD_LIBRARY_PATH=$AXIS2C_HOME/lib/:$AXIS2C_HOME/modules/rampart/
+cd /wherever/your/source/directory/is/cluster/
+./CCClient localhost:8774 describeServices
+./CCClient localhost:8774 describeResources
+./CCClient localhost:8774 terminateInstances i-12345678
+etc
+
View
15 node/handlers.c
@@ -228,15 +228,22 @@ void change_state( ncInstance *instance,
case RUNNING:
case BLOCKED:
case PAUSED:
- case SHUTDOWN:
- case SHUTOFF:
+ instance->stateCode = EXTANT;
+ instance->retries = LIBVIRT_QUERY_RETRIES;
+ break;
case CRASHED:
case BUNDLING_SHUTDOWN:
case BUNDLING_SHUTOFF:
case CREATEIMAGE_SHUTDOWN:
case CREATEIMAGE_SHUTOFF:
- instance->stateCode = EXTANT;
- instance->retries = LIBVIRT_QUERY_RETRIES;
+ case SHUTDOWN:
+ case SHUTOFF:
+ if (instance->stateCode == EXTANT) {
+ instance->stateCode = EXTANT;
+ } else {
+ instance->stateCode = PENDING;
+ }
+ instance->retries = LIBVIRT_QUERY_RETRIES;
break;
case TEARDOWN:
instance->stateCode = TEARDOWN;
Please sign in to comment.
Something went wrong with that request. Please try again.