Hide Forgot
Description of problem: Version-Release number of selected component (if applicable): How reproducible: 10/10 Prerequisites Candlepin A ,Candlepin B (on-premises) Steps to repro : import Invalid Owner from Candlepin A . Import Owner from invalid Candlepin (not candlepin ip). Expected Result : At step 1 Proper Error message should display on console for invalid Owner. At step 2 Proper Error message should display invalid Candlepin URL Actual Result : Migration started no error msg displayed on console. [root@candlepin1 ~]# curl -k -u admin:admin -X POST "https://10.65.193.123:8443/candlepin/migrations?entity=owner&id=101010101001010101010101&uri=10.65.193.174:8080" {"id":"migrate_owner_9cbfb240-a8f8-4de6-bbf6-427b727706ad","state":"CREATED","result":null,"startTime":null,"finishTime":null,"statusPath":"/jobs/migrate_owner_9cbfb240-a8f8-4de6-bbf6-427b727706ad","updated":"2011-03-31T18:30:21.031+0000","created":"2011-03-31T18:30:21.031+0000"}[root@candlepin1 ~]# [root@candlepin1 ~]# curl -k -u admin:admin -X POST "https://10.65.193.123:8443/candlepin/migrations?entity=owner&id=101010101001010101010101&uri=10.65.193.74:8080" {"id":"migrate_owner_581914a7-909d-4ef1-96fa-2e780eb4fcaf","state":"CREATED","result":null,"startTime":null,"finishTime":null,"statusPath":"/jobs/migrate_owner_581914a7-909d-4ef1-96fa-2e780eb4fcaf","updated":"2011-03-31T18:31:09.068+0000","created":"2011-03-31T18:31:09.068+0000"}[root@candlepin1 ~]#
Not sure this is worth fixing, we would have to start communicating with the remote candlepin, outside the context of the asynchronous job, so we could report the error before starting the job, rather than the details on the job we're kicking off. To me this is working as I would expect, kick off the job, check it's status later and see if anything went wrong. (dgoodwin@rhel6 ~/src) $ curl -k -u admin:admin -X POST "https://localhost:8443/candlepin/migrations?entity=owner&id=IDONTEXIST&uri=192.168.1.25:8080" {"id":"migrate_owner_c782fc19-944d-4424-b42e-96fb3da14910","state":"CREATED","result":null,"targetType":null,"startTime":null,"group":"async group","principalName":"admin","targetId":null,"finishTime":null,"statusPath":"/jobs/migrate_owner_c782fc19-944d-4424-b42e-96fb3da14910","updated":"2011-12-20T18:18:36.095+0000","created":"2011-12-20T18:18:36.095+0000"}% (dgoodwin@rhel6 ~/src) $ curl -k -u admin:admin "http://localhost:8080/candlepin/jobs/migrate_owner_c782fc19-944d-4424-b42e-96fb3da14910" {"id":"migrate_owner_c782fc19-944d-4424-b42e-96fb3da14910","state":"FAILED","result":"org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: org.candlepin.exceptions.NotFoundException: Can't find owner [IDONTEXIST]]","targetType":null,"startTime":"2011-12-20T18:18:36.112+0000","group":"async group","principalName":"admin","targetId":null,"finishTime":null,"statusPath":"/jobs/migrate_owner_c782fc19-944d-4424-b42e-96fb3da14910","updated":"2011-12-20T18:18:36.194+0000","created":"2011-12-20T18:18:36.095+0000"}% Anyone else have thoughts?
+1 to working as designed. We could add throwing JobExecutionException code to the execute method of the job, to update the cp_jobs table with a status. But beyond that we are NOT giving errors to the console. The PinsetterJobListener will take the value from the context and exception message and update the job as failed.
Going to close for now.