cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
842
Views
5
Helpful
2
Replies

Flags with resource-manager

romain.guilloux
Level 1
Level 1

Hi,

 

    I have a package, called 'service1', in NSOv4.6 which is using resource-manager v3.3.0 to allocate id. In service1, my main.py looks like :

..some code..
# Create an allocation request. # After calling this function, you have to call response_ready # to check the availability of the allocated ID. id_allocator.id_request(service=service, svc_xpath="/service1[myname='{}']".format(service.myname), username=tctx.username, pool_name='my_index', allocation_name=service.myname, sync=False, requested_id=-1 )
# Returns the allocated ID or None my_index = id_allocator.id_read(username=tctx.username, root=root, pool_name='my_index', allocation_name=service.myname ) if not my_index: self.log.info('Index not YET allocated') return
..some code..

Now I need to push my service using three flags : commit-queue async, no-out-of-sync-check and atomic false. Unfortunately, if I perform a commit with those flags (in cli), it doesn't work : my id is well allocated but my service (service1) is not pushed to my device. There is an heritage problem of flags I think.

 

So how to handle this issue (if it is one, maybe it was done on purpose) ?

 

Thanks.

2 Replies 2

frjansso
Cisco Employee
Cisco Employee

You're right, the resource manager reactive-re-deploys your service. *edit* - actually the reactive-re-deploy should honor the flags you passed. Bug?

If this is a behavior you always want on this device, is it possible to permanently enable them on the device?

Second option, can you pre-create the allocation, e.g. by using an action? That way, then the service runs, the allocated value(s) is available, and the flags should be honored.

Actually I don't want to set global settings since I have other services that can be activated at the same time.


Your second idea seems good. I'll try it, do I need Pronghorn to manage my workflow like this ?

1-input : myinput + myflags

2-action to resource my id

3-launch my service1