Volttron - object has no attribute 'vip' - volttron

While trying to call RPC method of another agent (pricepoint.agent) from one of my agent( smartstripui_srv.agent), there is an error - " INFO: 'SmartStripUI_Srv' object has no attribute 'vip'"
smartstripui_srv.agent is inheriting PublishMixin, BaseAgent.
I had tested calling RPC method of pricepoint.agent from a simple Agent and it is working.
In the case of an agent inheriting PublishMixin, BaseAgent, it seems that I might be missing setting some parameter.

PublishMixin and BaseAgent and everything else in volttron.platform.agent.base are for supporting backwards compatibility with VOLTTRON 2.0 Agents.
Don’t use them.
Inheriting from volttron.platform.vip.agent.Agent will give you everything you need to publish, subscribe, and do RPC calls and take full advantage of VOLTTRON 3.0 features and will make available the vip object in your agent.
Unfortunately we failed to move everything that was not for backward compatibility out of volttron.platform.agent when we released VOLTTRON 3.0. There are things in there that are still vital to 3.0 Agents such as the utils module.

Related

Archer GRC Automated Deployments

I am trying to figure out if Automated Deployments for Archer GRC is possible for the On Prem version ?
Currently it is deployed manually.
Latest version of Archer (v6.8, v6.9) has limited API provided to allow package deployments, BUT last time I checked they don't allow mapping and partial installs (I can be wrong, so double check).
API is there, but functionality is limited to the point that I don't see how package installation can be automated via provided API. I hope that in the next Archer versions it will be extended to replicate the functionality available with manual package deployment (mapping, partial installs, and other options).
Technically, if you like complex and time consuming tasks, you can decode/parse the package installation page. Then you can write an application to simulate HTTP packets sent to Archer server simulating the package installation.
I'm not aware of any company doing something like this as of today.
If you write a product to implement proper Code/Configuration Version Control for RSA Archer, then you may be able to sell it as well :)
Good luck!

SCCM Detection Methods - where are they stored?

By the end of last week our central IT Department introduced SCCM and applied it to a bunch of clients in our division. My colleagues and I work as so called "IT-Partner" in a 1st level support for a few hundrets of colleagues. Now we're facing some problems with our new SCCM System (installed packages do not work etc.) Now we'd like to "reset" applications so the SCCM Agend will reinstall them. I've read something about the detection methods but unfortunatelly I do not really know how they work nor I know where those methods are saved. I want to "analyse" those methods so I know which file to modify / delete that the agent will reinstall the application.
By the way, how much time does SCCM take from "assigning" a package to applying to the client?
Assuming you only have the client and no access to the SCCM Console the detection methods can be found using WMI. They are stored in root\ccm\CIModels in the Class Local_Detect_Synclet.
The format is XML in one column and it is designed so that all kinds of detection methods can basically be represented in the same style so it's not very readable but you should be able to get some basic understanding about the detection method used.
Keep in mind this is only true if the software was deployed in the "new" (introduced in sccm 2012) application format and not for the "old" package/program format.
If you want more detail I once tried to automate the process of triggering a reinstall for any given application but ultimately failed due to problems with the chache/distribution point. I posted all my findings here.
So from an application POV. When you deploy an app the detection method is setup in SCCM to determine wether or not the application installed successfully. This detection method could be configured a variety of ways. For example, it could check to see if the msi code is installed to determine success, it could check the .exe and compare it to a specific version, or even check a registry file for existence. In order to change/modify these detection methods you should be an SCCM admin and be able to login to the console. From there you would select the specific application or package you want to analyze and click through the properties of the deployment.

Bluemix Monitoring and Analytics: Resource Monitoring - JsonSender request error

I am having problems with the Bluemix Monitoring and Analytics service.
I have 2 applications with bindings to a single Monitoring and Analytics service. Every ~1 minute I get the following log line in both apps:
ERR [Resource Monitoring][ERROR]: JsonSender request error: Error: unsupported certificate purpose
When I remove the bindings, the log message does not appear. I also greped my code for anything related to "JsonSender" or "Resource Monitoring" and did not find anything.
I am doing some major refactoring work on our server, which might have broken things. However, our code does not use the Monitoring service directly (we don't have a package that connects to the monitoring server or something like that) - so I will be very surprised if the problem is due to the refactoring changes. I did not check the logs before doing the changes.
Any ideas will help.
Bluemix have 3 production environments: ng, eu-gb, au-syd, and I tested with ng, and eu-gb, both using 2 applications with same M&A service, and tested with multiple instances. They are all work fine.
Meanwhile, I received a similar problem that claim they are using Node.js 4.2.6.
So there are some more information we need to know to identify the problem:
1. Which version of Node.js are you using (Bluemix Default or any other one)
2. Which production environment are you using? (ng, eu-gb, au-syd)
3. Is there any environment variables are you using in your application?
(either the creating in code one, or the one using USER-DEFINED Variables)
4. One more thing, could you please try to delete the M&A service, and create it again, in case we are trapped in a previous fault of M&A.
cf ds <your M&A service name>
cf cs MonitoringAndAnalytics <plan> <your M&A service name>
NodeJS versions 4.4.* all appear to work
NodeJS uses openssl and apparently did/does not like how one of the M&A server certificates were constructed.
Unfortunately NodeJS does not expose the openssl verify purpose API.
Please consider upgrading to 4.4 while we consider how to change the server's certificates in the least disruptive manner as there are other application types that do not have an issue with them (e.g. Liberty and Ruby)
setting node js version 4.2.4 in package.json worked for me, however this is an alternative by-passing solution. Actual fix is being handled by core team. Thanks.

EJB 3.0 TimerService redeploy

A few weeks ago we developed an EJB 3.0 TimerService to schedule some tasks on demand (when the user clicked a button, we would create the timer to perform some tasks). So far it's been working well, until today.
Yesterday we redeployed the EJB containing de TimerService to update some properties, and today no timers were fired, even though there were some created.
¿Is this normal? I mean, if you don't change the signature of the ejbTimeOut, shouldn't it launch as always after a redeploy?
To make a timer persistent use the TimerHandle as explained here:
To save a Timer object for future reference, invoke its getHandle method and store the TimerHandle object in a database. (A TimerHandle object is serializable.) To re-instantiate the Timer object, retrieve the handle from the database and invoke getTimer on the handle. A TimerHandle object cannot be passed as an argument of a method defined in a remote or web service interface. In other words, remote clients and web service clients cannot access a bean’s TimerHandle object. Local clients, however, do not have this restriction.
Taken from http://docs.oracle.com/javaee/5/tutorial/doc/bnboy.html
Timers are persistent by default. When you restart server, redeploy application etc. probably if they were missed out, will timeout.
I have faced similar issues in the past. Therefore it's advisable to cancel all previous existing timers & then create new one afterwards.
That's the behavior in EJB 3.0. In EJB 3.1, timer service becomes much better. It supports automatic timer, which is created upon successful deployment. You may want to see if upgrading to EJB 3.1 is an option for you.
EE6 Tutorial: Using Timer Service
Enterprise bean timers are either programmatic timers or automatic
timers. Programmatic timers are set by explicitly calling one of the
timer creation methods of the TimerService interface. Automatic timers
are created upon the successful deployment of an enterprise bean that
contains a method annotated with the java.ejb.Schedule or
java.ejb.Schedules annotations.
Use asadmin redeploy command with --keepstate flag equals to true.
Full example:
asadmin redeploy --keepstate=true --name=taskee-1.0-SNAPSHOT target/taskee-1.0-SNAPSHOT.war
More info in:
http://www.oracle.com/technetwork/articles/java/pongegf-1517943.html

Nagios - Host/Service dependancy

I am implementing Nagios for a customer.
The customer has the following request;
We have a PC (PC-1) and a server (Server-1). The PC only has ping monitoring in Nagios, the server has Ping monitoring but also a service check (check if Citrix is up).
We would like PC-1 to go to a warning state when the Citrix service on Server-1 is in a down state. The reason we want that is for reporting purposes.
I am aware of service to service dependancy, but I am wondering if this service to host dependancy would work and how :).
Any help is welcome!
Thanks!
Yes, it can be done. See the docs on dependencies.
You don't explicitly make a service dependent on another host. Rather, you must make it dependent on a service on that host. Since services are also implicitly dependent on their hosts, this results in the behavior you want.
You can use your ping service check for this purpose, which is the only time you'd actually need a check_ping (or check_icmp) service check.
If you read the section on actual host dependencies, you'll see that the parent/child relationship is suggested, instead.

Resources