cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

Events not generating for BaseCmd classes

Open vishesh92 opened this issue 1 year ago • 1 comments

ISSUE TYPE
  • Improvement Request
COMPONENT NAME

CLOUDSTACK VERSION
all
CONFIGURATION
OS / ENVIRONMENT
SUMMARY

Events are not being generated for commands which extend BaseCmd. This results in missing events for some commands.

Ref.: https://github.com/apache/cloudstack/pull/8630#pullrequestreview-1914158484

STEPS TO REPRODUCE

EXPECTED RESULTS

ACTUAL RESULTS

vishesh92 avatar Mar 11 '24 08:03 vishesh92

In my understanding, action events in ACS are created mainly by the @ActionEvent annotation. For BaseAsyncCmd we do publish events with Scheduled state but that is just it. Trying to publish events for BaseCmd may require a lot of changes and refactoring. Would it be better to fix the specific cases where events are not generated highlighted in https://github.com/apache/cloudstack/pull/8630#pullrequestreview-1914158484? @vishesh92 @rohityadavcloud @sureshanaparti

shwstppr avatar Jun 10 '24 11:06 shwstppr

In my understanding, action events in ACS are created mainly by the @ActionEvent annotation. For BaseAsyncCmd we do publish events with Scheduled state but that is just it. Trying to publish events for BaseCmd may require a lot of changes and refactoring. Would it be better to fix the specific cases where events are not generated highlighted in #8630 (review)? @vishesh92 @rohityadavcloud @sureshanaparti

Agreed with @shwstppr comment, it is mainly addressed by ActionEvent annotation. I prefer to fix the specific cases. @vishesh92 are you fine with this ?

harikrishna-patnala avatar Jan 21 '25 05:01 harikrishna-patnala

Agreed with @shwstppr comment, it is mainly addressed by ActionEvent annotation. I prefer to fix the specific cases. @vishesh92 are you fine with this ?

I was thinking of a standard way in order to ensure we don't miss it for new commands added in the future. If the effort seems a lot, I am okay with specific cases as well.

vishesh92 avatar Jan 23 '25 07:01 vishesh92

I'm not sure how complicated this will be but it seems mostly search work per event, so @vishesh92 let's make seperate child issues for

  • hosts
  • projects
  • internal lb
  • ssh key pairs
  • affinity groups
  • vm snapshots
  • firewall
  • static nat

as per @kiranchavala 's report in https://github.com/apache/cloudstack/pull/8630#pullrequestreview-1914158484

makes sense?

DaanHoogland avatar Mar 05 '25 16:03 DaanHoogland

fixed few cases mentioned in the comments by the PR https://github.com/apache/cloudstack/pull/11230

harikrishna-patnala avatar Sep 02 '25 12:09 harikrishna-patnala