cryostatio / cryostat

Other
7 stars 8 forks source link

[Bug] Recordings created do not stop or archive when time expires. #453

Closed aali309 closed 1 month ago

aali309 commented 1 month ago

Current Behavior

Created recordings do not stop or archive when recording duration expires.

Expected Behavior

When recordings are created with the option Archive on Stop, the recording should stop and archive when the duration expires.

Steps To Reproduce

  1. run smoketest.
  2. go to Recordings
  3. select localhost:0 target
  4. start a 10 second recording with Archive on Stop option selected.
  5. wait 10 seconds. no notification appears, table does not update
  6. go to Events and back to Recordings
  7. notification appears and recording is now in STOPPED state
  8. go to Recordings > Archived Recordings, there is no archived recording

seems like probable a regression due to: https://github.com/cryostatio/cryostat3/pull/415

Anything else?

cryostat_1 | May 10, 2024 3:16:15 PM io.cryostat.discovery.ContainerDiscovery isTargetUnderRealm cryostat_1 | WARN: Expected persisted target with serviceURL service:jmx:rmi:///jndi/rmi://jfr-datasource:11223/jmxrmi to be under realm Podman but found under JDP cryostat_1 | May 10, 2024 3:16:15 PM io.cryostat.discovery.PodmanDiscovery handleContainerEvent cryostat_1 | WARN: jakarta.resource.spi.IllegalStateException s3_1 | [raft]15:16:15.783971 [10.89.20.12:9333 Term:0] check.quorum.active with quorum size: 1 member count: 1 cryostat_1 | 2024-05-10 15:16:15,924 DEBUG [org.qua.cor.QuartzSchedulerThread] (QuarkusQuartzScheduler_QuartzSchedulerThread) batch acquisition of 0 triggers cryostat_1 | 2024-05-10 15:16:15,924 DEBUG [org.qua.cor.JobRunShell] (QuarkusQuartzScheduler_Worker-2) Calling execute on job eLxtM9kV5FUnTEh-FC8LEXufDH8yUqhfG4xrnKHv2Js=.test cryostat_1 | 2024-05-10 15:16:15,924 INFO [org.qua.cor.JobRunShell] (QuarkusQuartzScheduler_Worker-2) Job eLxtM9kV5FUnTEh-FC8LEXufDH8yUqhfG4xrnKHv2Js=.test threw a JobExecutionException: : org.quartz.JobExecutionException: jakarta.enterprise.context.ContextNotActiveException: Cannot use the EntityManager/Session because neither a transaction nor a CDI request context is active. Consider adding @Transactional to your method to automatically activate a transaction, or @ActivateRequestContext if you have valid reasons not to use transactions. [See nested exception: jakarta.enterprise.context.ContextNotActiveException: Cannot use the EntityManager/Session because neither a transaction nor a CDI request context is active. Consider adding @Transactional to your method to automatically activate a transaction, or @ActivateRequestContext if you have valid reasons not to use transactions.] cryostat_1 | at io.cryostat.recordings.RecordingHelper$StopRecordingJob.execute(RecordingHelper.java:1321) cryostat_1 | at org.quartz.core.JobRunShell.run(JobRunShell.java:202) cryostat_1 | at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) cryostat_1 | Caused by: jakarta.enterprise.context.ContextNotActiveException: Cannot use the EntityManager/Session because neither a transaction nor a CDI request context is active. Consider adding @Transactional to your method to automatically activate a transaction, or @ActivateRequestContext if you have valid reasons not to use transactions. cryostat_1 | at io.quarkus.hibernate.orm.runtime.session.TransactionScopedSession.acquireSession(TransactionScopedSession.java:107) cryostat_1 | at io.quarkus.hibernate.orm.runtime.session.TransactionScopedSession.createQuery(TransactionScopedSession.java:366) cryostat_1 | at org.hibernate.engine.spi.SessionLazyDelegator.createQuery(SessionLazyDelegator.java:548) cryostat_1 | at org.hibernate.engine.spi.SessionLazyDelegator.createQuery(SessionLazyDelegator.java:66) cryostat_1 | at org.hibernate.Session_3a974b6a18ac399f675913d732c105426414d370_Synthetic_ClientProxy.createQuery(Unknown Source) cryostat_1 | at io.quarkus.hibernate.orm.panache.common.runtime.CommonPanacheQueryImpl.createBaseQuery(CommonPanacheQueryImpl.java:366) cryostat_1 | at io.quarkus.hibernate.orm.panache.common.runtime.CommonPanacheQueryImpl.createQuery(CommonPanacheQueryImpl.java:344) cryostat_1 | at io.quarkus.hibernate.orm.panache.common.runtime.CommonPanacheQueryImpl.singleResultOptional(CommonPanacheQueryImpl.java:315) cryostat_1 | at io.quarkus.hibernate.orm.panache.runtime.PanacheQueryImpl.singleResultOptional(PanacheQueryImpl.java:174) cryostat_1 | at io.cryostat.recordings.RecordingHelper$StopRecordingJob.execute(RecordingHelper.java:1315) cryostat_1 | ... 2 more cryostat_1 |