Return workers to their home node only when there is no work - simulation

I have a simulation model with following flow:
source -> seize -> delay -> release -> sink
In the release block, I want to configure the worker to go back to their home/base location only when there is no more agents from the source block.
I have tired 2 configs:
Return to home location -> each time: In this case, each worker moves to their home/base location and then go to the source block (which makes sense)
Return to home location -> in no other task: In this case, the worker gets stuck at sink node and does not move (either to their base node or to the source node)
How do I make the worker go to the source node if there are more source agents or go to their base node if there is no more agent in the source node?

Related

How to allow Rundeck job to pickup latest node inventory list?

There are two Rundeck Jobs in the infra:
Job 01: (For local execution)
Will allow the user to upload a file consisting of servers list (Nodes: Execute Locally on rundeck)
The new nodes list will get updated to the new inventory file (resources.xml) which will be used by Rundeck henceforth
Triggers an API call to run Job 02
Job 02: (For remote execution)
Will run the Job for the updated inventory list.
Result: The runs were successful. The new nodes are reflecting to the latest inventory.
Problem: The issue is after 5 such executions, Rundeck uses the cache inventory names. For example, For Job execution #5, it uses #4 execution's inventory list. Is there any way this can be avoided? This could turn out to be a bigger issue when deployed in large.
You can decrease the model source cache delay time, go to Project Settings > Edit Nodes > Configuration tab, and set the Cache Delay textbox in seconds (default value: 30 seconds).

Issues with failback for logical replication using postgres

I am using PostgreSQL 13 to set up logical replication. When the original active node (A) becomes the secondary, the prior secondary(B) which is now active node needs to sync to the (A) node.
To summarize the issue:
Node A is active and fails at some point of time. Node B takes over and now running is active and accepting I/O from application. Now when Node A is recovered from failure and ready to become active again. In order to happen this Node A is trying to get the data which may be have been added while Node A was down. To get the this data Node A is creating a subscription to Node B which is now acting as a publisher. Issue is that this subscription on Node A fails as Node A already has some data before it went down and this data results in conflicts.
So what are my options here?

Jenkins trigger job by another which are running on offline node

Is there any way to do the following:
I have 2 jobs. One job on offline node has to trigger the second one. Are there any plugins in Jenkins that can do this. I know that TeamCity has a way of achieving this, but I think that Jenkins is more constrictive
When you configure your node, you can set Availability to Take this slave on-line when in demand and off-line when idle.
Set Usage as Leave this machine for tied jobs only
Finally, configure the job to be executed only on that node.
This way, when the job goes to queue and cannot execute (because the node is offline), Jenkins will try to bring this node online. After the job is finished, the node will go back to offline.
This of course relies on the fact that Jenkins is configured to be able to start this node.
One instance will always be turn on, on which the main job can be run. And have created the job which will look in DB and if in the DB no running instances, it will prepare one node. And the third job after running tests will clean up my environment.

Multiple slave agent in UVM

I am planning to implement multiple slave agents in my env and a single master agent.
Can anybody show me an example how to use this feature in UVM.And how do we start the item for a particular slave sequencer from the testcase.
This is pretty typical. Without details, the general outline is:
In build_phase:
Create and configure the agents just as you have described.
The masters and slaves will be configured as active.
A slave agent is typically a reactive agent that responds to stimulus from the DUT so in that case, sequence items in the slave driver will be initiated by the DUT so they aren't under direct testcase control.

How to activate a particular node through java code / workflow in Day CQ

I want to activate only the modified node in my Day CQ project.
Node structure is:
Parent Node
Child Node 1
Child Node 2
Child Node 3
Requirement is:
If I am creating any node under parent node workflow should run.
Workflow should activate only newly created child node and parent node and not all child nodes.
Is it possible ??? Please give solution also in comment......
This can be easily relaised in using the workflow console.
Open the workflow console create a workflow model using in the models tab.
Then open the model and add the "Activate Page/Asset Step [com.day.cq.wcm.workflow.process.ActivatePageProcess]" to the model.
Save the model and switch to the launcher tab.
Create a new launcher for the path of the your parent node and select event type "Created".