openbaton / autoscaling-engine

Respository containing the source code of the autoscaling system
Apache License 2.0
5 stars 5 forks source link

AES should wait for ACTIVE or ERROR event from NFVO #14

Closed wittling closed 6 years ago

wittling commented 6 years ago

If you start NFVO and then start AES, AES produces error because the state of the NSR is NULL (initially). What it probably should do, is to notice that the NSR ID is NULL, and wait for for an NFVO event that tells the AES whether the NFVO has moved it to the ACTIVE state, or into a state of ERROR

(see log below with further comments)

2017-10-23 19:27:37.654 DEBUG 5763 --- [ main] o.o.s.a.rest.NetworkServiceRecordAgent : Post: https://172.31.0.136:8443/api/v1/components/services/register 2017-10-23 19:27:37.703 DEBUG 5763 --- [ main] o.o.s.a.rest.NetworkServiceRecordAgent : Executing get on: https://172.31.0.136:8443/api/v1/ns-records 2017-10-23 19:27:37.808 WARN 5763 --- [ main] org.openbaton.autoscaling.Application : Cannot add NSR with id: 1d304360-11ca-4a0f-ba66-0149660f2983 to autoscaling because it is in state: NULL and not in state ACTIVE or ERROR. 2017-10-23 19:27:37.809 INFO 5763 --- [ main] org.openbaton.autoscaling.Starter : Started Starter in 4.828 seconds (JVM running for 5.181)

It does not appear to recover from this error. I noticed that after the VMs came up, and I restarted the AES (I was running it in foreground), I then got the following messages:

2017-10-23 19:33:41.478 DEBUG 6124 --- [ main] o.o.s.a.rest.NetworkServiceRecordAgent : Post: https://172.31.0.136:8443/api/v1/components/services/register 2017-10-23 19:33:41.501 DEBUG 6124 --- [ main] o.o.s.a.rest.NetworkServiceRecordAgent : Executing get on: https://172.31.0.136:8443/api/v1/ns-records 2017-10-23 19:33:41.567 DEBUG 6124 --- [ main] org.openbaton.autoscaling.Application : Adding previously deployed NSR with id: 1d304360-11ca-4a0f-ba66-0149660f2983 to autoscaling 2017-10-23 19:33:41.571 DEBUG 6124 --- [ main] o.o.a.c.management.ElasticityManagement : Activating Elasticity for NSR with id: 1d304360-11ca-4a0f-ba66-0149660f2983 2017-10-23 19:33:41.576 DEBUG 6124 --- [ main] o.o.a.c.detection.DetectionManagement : Activating Alarm Detection for AutoScalePolicy with id: a57621f7-4bbc-4a5e-aedb-104c6b19673d of VNFR edfada2b-6d8f-4d75-b751-a2276d58505c of NSR with id: 1d304360-11ca-4a0f-ba66-0149660f2983 2017-10-23 19:33:41.576 DEBUG 6124 --- [ main] o.o.a.c.detection.DetectionManagement : Creating new DetectionTask for AutoScalingPolicy scale-out with id: a57621f7-4bbc-4a5e-aedb-104c6b19673d of VNFR with id: edfada2b-6d8f-4d75-b751-a2276d58505c 2017-10-23 19:33:41.584 INFO 6124 --- [ main] o.o.a.c.detection.DetectionManagement : Activated Alarm Detection for AutoScalePolicy with id: a57621f7-4bbc-4a5e-aedb-104c6b19673d of VNFR edfada2b-6d8f-4d75-b751-a2276d58505c of NSR with id: 1d304360-11ca-4a0f-ba66-0149660f2983 2017-10-23 19:33:41.584 INFO 6124 --- [ main] o.o.a.c.management.ElasticityManagement : Activated Elasticity for NSR with id: 1d304360-11ca-4a0f-ba66-0149660f2983 2017-10-23 19:33:41.585 DEBUG 6124 --- [TaskScheduler-1] o.o.a.core.detection.task.DetectionTask : Starting DetectionTask the first time. So wait for the cooldown... 2017-10-23 19:33:41.585 INFO 6124 --- [ main] org.openbaton.autoscaling.Starter : Started Starter in 4.514 seconds (JVM running for 4.892)

Unfortunately, the AES never starts functioning. I believe this is related to the fact that in the Dashboard, I see the following in the Event Listing: ID: 59eb67bb-880b-45a5-a09b-6a634ad43275 Name: Subscription:ERROR Endpoint: http://localhost:9999/elasticity-management/ERROR Event: ERROR This is probably a separate issue.