I am wondering if the following is a bug or a feature:

When I start two instances, each one with a different value (via a key) of 
instance variable "A" and then stop one using a specific KEY, it stops both 
instances.

I would have expected only the one with the specified key that matches a 
specific instance would be stopped:

Created the file /etc/init/test.conf with the following contents:
(The behavior is the same if I use $A instead of ${A})

-------- Start of test.conf -----

start on (start_foo A=*)

stop on (stop_foo A=*)

instance ${A}

script
        logger -i -t test "Starting A: $A"
        exec yes
end script

-------- End of test.conf -----

Then when I start two instances, each one with a different instance variable "A"
and then stop one using a specific KEY, it stops both instances. 

I would have expected only the one with the specified key that matches a 
specific instance would be stopped. 

Here is a transcript of a shell session showing this:

# initctl emit start_foo A=hello                                                
                                                   
# initctl list | grep test                                                      
                                                   
test (hello) start/running, process 17432
# initctl emit start_foo A=goodby                                               
                                                   
# initctl list | grep test                                                      
                                                   
test (hello) start/running, process 17432
test (goodby) start/running, process 17438
# initctl emit stop_foo A=goodby                                                
                                                   
# initctl list | grep test                                                      
                                                   
test stop/waiting

Am I doing something wrong or just have incorrect expectations of how this 
should work?
Thanks
Rob

__________________
Robert J Berger - CTO
Runa Inc.       
520 San Antonio Rd Suite 210, Mountain View, CA 94040
+1 408-838-8896
http://blog.ibd.com / http://www.runa.com

-- 
upstart-devel mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/upstart-devel

Reply via email to