Bug 839373 - Deltacloud/RHEVM: Multiple jobs can refer to the same running instance
Deltacloud/RHEVM: Multiple jobs can refer to the same running instance
Status: CLOSED WONTFIX
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: condor-deltacloud-gahp (Show other bugs)
2.2
x86_64 Linux
low Severity low
: ---
: ---
Assigned To: grid-maint-list
MRG Quality Engineering
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-11 14:36 EDT by Luigi Toscano
Modified: 2016-05-26 16:14 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-05-26 16:14:13 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Luigi Toscano 2012-07-11 14:36:57 EDT
Description of problem:
Create a deltacloud job (tested with RHEV-M), submit it.
Wait for it to be running.
Submit the same job again.

Result: the status of the new job switches to running almost immediately because it finds the existing running instance; so both jobs refer to the _same_ image.

Version-Release number of selected component (if applicable):
condor-deltacloud-gahp-7.6.5-0.16
condor-7.6.5-0.16

Expected results:
Subsequent request of a running machine should be not considered (hold state maybe?)
Comment 1 Luigi Toscano 2012-07-12 08:46:23 EDT
Please note that when the instance is terminated by invoking shutdown inside it, the first job terminates; the second job instead stays alive and restarts the instance.

Example of job:
--------------------------------------------------
universe = grid
grid_resource = deltacloud http://dc.example.com:3002/api 
executable = rhevm_job
deltacloud_username = user@domain
deltacloud_password_file = user_pwd_file

deltacloud_instance_name = instance_name

log = /tmp/job_deltacloud_basic_$(cluster)_$(process).log
notification = NEVER
queue
-------------------------------------------------
Comment 3 Timothy St. Clair 2012-07-17 12:44:22 EDT
presently we use instance.id which appears to not be unique, per "instance".

///////////////////////////////////////////////////////////
struct deltacloud_instance {
  char *href; /**< The full URL to this instance */
  char *id; /**< The ID of this instance */
  char *name; /**< The name of this instance */
  char *owner_id; /**< The owner ID of this instance */
  char *image_id; /**< The ID of this image this instance was launched from */
  char *image_href; /**< The full URL to the image */
  char *realm_id; /**< The ID of the realm this instance is in */
  char *realm_href; /**< The full URL to the realm this instance is in */
  char *state; /**< The current state of this instance (RUNNING, STOPPED, etc) */
  char *launch_time; /**< The time that this instance was launched */
  struct deltacloud_hardware_profile hwp; /**< The hardware profile this instance was launched with */
  struct deltacloud_action *actions; /**< A list of actions that can be taken on this instance */
  struct deltacloud_address *public_addresses; /**< A list of the public addresses assigned to this instance */
  struct deltacloud_address *private_addresses; /**< A list of the private addresses assigned to this instance */
  struct deltacloud_instance_auth auth; /**< The authentication method used to connect to this instance */

  struct deltacloud_instance *next;
};
///////////////////////////////////////////////////////////

GridJobId = "deltacloud mrgqe6v32 924095d8-98e1-4774-9781-a01a8813b8b8"  
is the same for both?

I need to dig some more, but it's possible we may need to create a hash with the  launch_time && always iterate over ->next.
Comment 4 Luigi Toscano 2012-07-17 12:49:57 EDT
(In reply to comment #3)

> GridJobId = "deltacloud mrgqe6v32 924095d8-98e1-4774-9781-a01a8813b8b8"  
> is the same for both?

Yes, it is.
Comment 5 Anne-Louise Tangring 2016-05-26 16:14:13 EDT
MRG-Grid is in maintenance and only customer escalations will be considered. This issue can be reopened if a customer escalation associated with it occurs.

Note You need to log in before you can comment on or make changes to this bug.