Starting of a remote device manager - redhawksdr

I am running a waveform that has devices on more than one computer. The domain manager and a device manager starts up on one GPP(1). A device manager starts up on the other GPP(2). The domain manager and the device managers are started when the GPP(s) are being boot up.
I can have a procedure for the operator, that states start GPP(2) up first, then GPP(1). But this approach is not preferable. I would like the ability to start the Device Manager on GPP(2) from GPP(1) after the domain manager has been started.
Does REDHAWK have a standard way of starting remote Device Managers?

The DeviceManager is designed to wait for the DomainManager on startup. So, the standard procedure is to add a script to /etc/init.d so that the remote DeviceManager will start up whenever the remote machine running it boots.
To clarify, let's elaborate using your example. Machine 1 will run the DomainManager and DeviceManager(1)/GPP(1). This machine could be at 192.168.1.1. Machine 2 will run DeviceManager(2)/GPP(2). This machine could be at 192.168.1.2.
The DomainManager will start up whenever machine 1 boots. It will wait happily for DeviceManagers to register with it.
Machine 2's /etc/omniORB.cfg file is set to point to 192.168.1.1. When it boots, the DeviceManger will attempt to register with the DomainManager. One of two things will happen:
The DomainManager at 192.168.1.1 is already up and running. In this case, DeviceManager(2) registers successfully and is ready to run applications.
The DomainManager at 192.168.1.1 is not yet running. In this case, DeviceManager(2) will hang out and wait for the DomainManager to come up.

Related

Ubuntu 18 - Netplan - cloud.cfg disable issue

Using Ubuntu 18.04 Server LTS for an embedded application. Two physical network interfaces are present, one ethernet and one a PCI Athros wifi card. I can use netplan .YAML and ifconfig up/down to manually control and switch between interfaces.
I have added the 99-disable-network-config.cfg file with the contents:
network: {config: disabled}
to the /etc/cloud/cloud.cfg.d directory. Netplan apply has been run (multiple times)
I have one 01_xx.YAML file present in /etc/netplan that sets the Wifi adapter up to DHCP. The expectation is that the ethernet interface will remain down on a reboot. When I reboot I see the startup message that it is attempting to initialize the network and it times out after 2 minutes as failing. However as soon as I am at the CLI prompt I check the interfaces and I have both the ethernet and Wifi interfaces up and connected.
Is there a way to actually keep one of the interfaces down at startup? I want to only have one adapter being started based on the 01_xx.YAML I have set.
And then to keep the startup networking timeout from running to 2 minutes? I suspect this is part of systemd but I can't find it. This doesn't seem to be related to the dhclient.conf timeout parameter as I already have it set to 30 seconds.
Assuming you're using the networkd renderer, try adding optional: true to the device definition. This will tell systemd-networkd not to wait for it on boot.

Oracle Linux, prevent Network Adapter from sleep when running in VirtualBox on macOS

I have installed Oracle Linux 7 with the current version of VirtualBox, running on mac OS Sierra with a macbook. It therefore has a battery but is plugged in at all times.
For networking I use 2 adapters, one NAT for internet and one Host-Guest for ssh etc.
For some time now I was always wondering why I would get a broken ssh pipe, trial and error showed me that the VM will go to sleep (black screen), which causes the network adapter to break, telling me the name of the adapter and simply Reset adapter as soon as I wake it up again by typing into the vm itself.
I can then restart the network adapter via /etc/init.d/network restart and it will work again
Any ideas how I can change that? My Linux skills are very limited and I am not even sure what Oracle Linux is based on, most tips I find online do not work, no GUI also makes it difficult to just hop into power settings or something similar
This worked for me, on Windows host machine.
Configure your network adapter to
1) Allow the network adapter to wake the computer,
2) Allow a magic packet to wake the computer,
3) Allow IPV6
http://www.worldstart.com/dropped-internet-connection-in-sleep-mode/
Now, when I sleep my computer, and then wake it up, I get networking on both the host and guest, not just host.

How to start and stop an external program in another device using Qt?

I'm developing a firmware updater that should download data from a web server and upload it to an Embedded Linux device.
I want a program (client) to start another program (server) before establishing a connection between them and start sending the data. To do that in the same environment is easy: just call QProcess and startDetached(), but I want to do that remotely: I want to start the client in the Desktop machine and, with the device connected via ETH/TCP in a known IP address, click a button which will ask the device to start the server. When the server finishes starting and start waiting for connections, the Desktop app will then open the socket connection and start sending the data. After all data have being send, another command should be send to ask the server to shut down, closing the connection and finishing the file transfer operation.
My question is: how can I do this operation of asking for an application to either start or stop when it is located in a different machine (in an Embedded Linux device while the caller is in a PC)? Notice that the solution must be such that doesn't depend on some extra software (such as a Tcp server) to constantly run on the device - that's precisely what I'm trying to avoid.
This is not related to Qt in any way, because it doesn't provides anything for that purpose.
There are at least two paths from this point:
use SSH from your application to start any process in the remote machine: ssh user#remote-machine "any command here". This can be called using QProcess;
or
write another software to listen to socket commands and start/stop any process you want, then get it running all the time in the remote machine. Then, it's just a matter of changing your client software to send the relevant commands
Beware of any security issue that may arise by allowing the machine to execute arbitrary commands from external sources.

Linux TTY remotely

I am maintaining a Virtual Machine on a Cloud Service with Linux (SLES) operating system. At some point, someone logged in, did some major things (e.g. chmod 777 on ALL files, etc) and, with some other things that he did, messed up the system.
It would be no surprise if he actually hacked it, but...
The vm is hosted inside a VPN (unreachable from outside the VPN), and last root command specifies a user connected through tty1 (!!!), with no IP address, while all my connections, root and user are pts/X.
My thoughts (not like I am an expert) are concluding on one thing, this user must have physical (?) access to cloud service, since tty is reachable locally.
Which means, that if that is true, the "attacker" must be someone from inside the Cloud-Service hosting company.
Question:
Is there ANY way you can connect remotely to a server/cloud service virtual machine using ttyX?
Correct me at any point you see wrong; as I mentioned I am not an expert but I am more than willing to learn.
Depending on the hypevisor, it provides a remote console, so, it is kind of local console connected from a remote place. Also, there is a ipmi protocol that can connected to the hypervisor and use the sol (serial-over-lan) command.
Other than that, the user might be connecting using a VNC, that would also be shown as a tty connection
IPMI SOL: http://www.alleft.com/sysadmin/ipmi-sol-inexpensive-remote-console/
Remote qemu guest console: How to switch to qemu monitor console when running with "-curses"
VNC on guests: https://askubuntu.com/questions/262700/qemu-kvm-vnc-support

Does windows azure virtual machine logs out when disconnecting

I use windows azure virtual machine. I have a few programs running, but in the future, they have to run non-stop.
If I disconnect from my virtual machine, will the virtual machine log out/shut down?
I have essential programs running, and if they stop running, it will be a huge problem for me.
No, your Virtual Machines don't shut down when you disconnect from rdp/ssh. However: There's always the possibility that your machine will restart, even if infrequently (e.g. failed hardware, Host OS maintenance, etc.). So... your essential programs should be set up to auto-start at boot time, without requiring you to rdp/ssh in to start them up again.

Resources