Hi,
During latest researches in control loop scenario we've identified a problem
with recipe names.
Generally the problem exists when configuring Closed Loop in clamp and choose
in HealthCheck as action that should be performed after threshold is exceeded.
Everything is fine until Policy is trying to perform action and then it fails
with exception.
We've investigated it a bit deeper. Outcome is that when choosing action/recipe
combined from 2 words (like HealthCheck) clamp creates yaml with this action
and sends it to configure drools rule template. Then when drools tries to
perform action using APPC it takes recipe from yaml and uses it to create lcm
request. In request action name is used both in URL:
/restconf/operations/appc-provider-lcm:health-check
and in body:
{
...
"action": "HealthCheck"
...
}
In current solution for health check clamp sends 'healthCheck' as recipe in
yaml file.
When policy creates request in function
AppcLcmActorServiceProvider.constructRequest(...) to format URL it uses
lowercase recipe and for body it capitalizes it.
That causes situation where we get URL:
/restconf/operations/appc-provider-lcm:healthcheck
and body
{
...
"action": "Healthcheck"
...
}
That causes an error in APPC:
Invalid value 'Healthcheck' for enum type. Allowed values are: [Restart,
Rebuild, Migrate, Evacuate, Snapshot, Rollback, Sync, Audit, Stop, Start,
Terminate, SoftwareUpload, HealthCheck, LiveUpgrade, Lock, Unlock, Test,
CheckLock, Configure, ConfigModify, ConfigScaleOut, ConfigRestore,
ConfigBackup, ConfigBackupDelete, ConfigExport, StopApplication,
StartApplication, QuiesceTraffic, ResumeTraffic, UpgradePreCheck,
UpgradeSoftware, UpgradePostCheck, UpgradeBackup, UpgradeBackout, ActionStatus,
Query, Reboot, AttachVolume, DetachVolume]
This bug will also be observed when we try to use ConfigModify (not available
by default but can be added in properties) in CLAMP and all other actions
combined of two words.
>From my current observations multi-word actions are dash case in URL and camel
>case in body. So proposition for the solution for this bug is to:
1. standardize way those kind of actions are send from CLAMP
2. change request construction in
AppcLcmActorServiceProvider.constructRequest(..) in Policy
We can take care of that bug. What we need is:
* an approve that our theory about cases is fine and proposed solution will
work for other scenarios
* an approve from community
Br,
Adam Krysiak
Software Engineer
MN MANO RD&Pz ONAP-UI-ML DEVOPS WRO 2 SG
Nokia
Contact number: +48691441316
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#12093): https://lists.onap.org/g/onap-discuss/message/12093
Mute This Topic: https://lists.onap.org/mt/25037780/21656
Group Owner: [email protected]
Unsubscribe: https://lists.onap.org/g/onap-discuss/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-