How to hotplug interface by libvirtd? - virtual-machine

I'm trying to hotplug a interface to a running domain by the following command :
bash-4.4# virsh attach-interface 1 --type network --source net1 --model virtio-non-transitional --target /sys/devices/virtual/net/net1/tap603053 --mac ac:de:48:77:a2:32 --config --live
Authorization not available. Check if polkit service is running or see debug message for more information.
error: Failed to attach interface
error: Failed to connect socket to '/var/run/libvirt/virtnetworkd-sock': No such file or directory
As you can see, I got the error upon.
According to libvirt daemons, there's two arch which is "Monolithic daemon" and "modular daemon". So I think if I use the "Monolithic daemon" to hotplug an interface then virsh will not connect to virtnetworkd but libvirtd(libvirtd is exist). So I change the command to the following :
bash-4.4# virsh -c qemu:///system attach-interface 1 --type network --source net1 --model virtio-non-transitional --target /sys/devices/virtual/net/net1/tap603053 --mac ac:de:48:77:a2:32 --config --live
Authorization not available. Check if polkit service is running or see debug message for more information.
error: Failed to attach interface
error: Failed to connect socket to '/var/run/libvirt/virtnetworkd-sock': No such file or directory
As you can see I still got the error same with first command.
My question is : how should I hotplug an interface without virtnetworkd running ?

Related

Sourcetree not able to access GitLab

I have 2 PCs, each with SourceTree installed. On each machine, I run ssh-keygen -t rsa to generate the public & private keys and I place them in the folders:
G:/.ssh/PC1
G:/.ssh/PC2
under each folder, there are 3 files : id_rsa, id_rsa.pub, known_hosts.
I copied the content of each id_ras.pub to create a SSH key in server. On each machine, in SourceTree, I specify the "SSH Client Configuration" so that
SSH Key points to G:\.ssh\PC1\id_rsa & G:\.ssh\PC2\id_rsa
OpenSSH is used in both machine for SSH Client.
But it appears that one of the PCs is able to access GitLab properly in SourceTree, i.e., push/pull work; on the other PC, when launching SourceTree, it alerts:
'ssh-agent' failed with code -1: System.Exception:Unable to start 'C:\Users\xxx\AppData\Local\Atlassian\SourceTree\git_local\bin\ssh-agent.exe' check the git installation.
Further, I tried a new check out from GitLab to a new folder on the PC that is not working and after that it starts to work. But later, it stops working and gives the same alert.
I tried to pull from repository, and it errors:
git -c diff.mnemonicprefix=false -c core.quotepath=false fetch origin
C:\Users\xxx\AppData\Local\Atlassian\SourceTree\git_local\bin\sh.exe: *** fork: can't reserve
memory for stack 0x2E60000 - 0x3060000, Win32 error 0
0 [main] sh 11020 sync_with_child: child 7124(0x238) died before initialization with status code 0x1
13 [main] sh 11020 sync_with_child: *** child state waiting for longjmp
C:\Program Files (x86)\Atlassian\SourceTree\tools\openssh_wrapper.sh: fork: Resource temporarily unavailable
fatal: Could not read from remote repository.

minishift start using virtualbox on windows throws timeout error

I am trying to start minishift on my machine. It successfully creates minishift VM but throws time out error.
Configuration:
Minishift version: v1.34.0+f5db7cb
OS: Windows 10
Hypervisor: Virtual Box v6.0.10
PS C:\WINDOWS\system32> minishift start
-- Starting OpenShift cluster .......................................................................Error during 'cluster up' execution: Error starting the cluster. ssh command error:
command : /var/lib/minishift/bin/oc cluster up --image 'openshift/origin-${component}:v3.11.0' --public-hostname 192.168.99.100 --routing-suffix 192.168.99.100.nip.io --base-dir /var/lib/minishift/base
err : exit status 1
output : Getting a Docker client ...
Checking if image openshift/origin-control-plane:v3.11.0 is available ...
Pulling image openshift/origin-cli:v3.11.0
E0725 17:15:42.919928 5316 helper.go:173] Reading docker config from /home/docker/.docker/config.json failed: open /home/docker/.docker/config.json: no such file or directory, will attempt to pull image docker.io/openshift/origin-cli:v3.11.0 anonymously
Image pull complete
E0725 17:15:44.643860 5316 helper.go:173] Reading docker config from /home/docker/.docker/config.json failed: open /home/docker/.docker/config.json: no such file or directory, will attempt to pull image docker.io/openshift/origin-node:v3.11.0 anonymously
Pulling image openshift/origin-node:v3.11.0
Pulled 5/6 layers, 85% complete
Pulled 6/6 layers, 100% complete
Extracting
Image pull complete
Checking type of volume mount ...
Determining server IP ...
Using public hostname IP 192.168.99.100 as the host IP
Checking if OpenShift is already running ...
Checking for supported Docker version (=>1.22) ...
Checking if insecured registry is configured properly in Docker ...
Checking if required ports are available ...
Checking if OpenShift client is configured properly ...
Checking if image openshift/origin-control-plane:v3.11.0 is available ...
I0725 17:16:20.775520 5316 config.go:40] Running "create-master-config"
Starting OpenShift using openshift/origin-control-plane:v3.11.0 ...
I0725 17:16:31.108342 5316 config.go:46] Running "create-node-config"
I0725 17:16:35.237968 5316 flags.go:30] Running "create-kubelet-flags"
I0725 17:16:36.785234 5316 run_kubelet.go:49] Running "start-kubelet"
I0725 17:16:37.288388 5316 run_self_hosted.go:181] Waiting for the kube-apiserver to be ready ...
E0725 17:21:37.300062 5316 run_self_hosted.go:571] API server error: Get https://192.168.99.100:8443/healthz?timeout=32s: dial tcp 192.168.99.100:8443: connect: connection refused ()
Error: timed out waiting for the condition
Expected result: It should provide me without errors link to open web console
This happens to me sometimes too.
Solutions include:
minishift stop && minishift start (turn it off and on again)
restart Windows (perhaps VBox has corrupted itself again)
More info on my minishift setup is here:
http://divby0.blogspot.com/2019/07/configuring-minishift-for-use-with.html
For what it's worth I use a combination of linux shells in Windows 10 to interact with minishift / docker daemon:
Git Bash (usually the best)
Docker Toolbox (plan B when something won't run in Git Bash shell)
WSL (ubuntu based, plan C in desperation)

Docker Toolbox - OpenShift Origin - OCI runtime create failed

I successfully installed Docker Toolbox (Docker version 18.03.0-ce, build 0520e24302)on my Win10 PC,
I've downloaded "openshift/origin-release" official image from Docker Hub using this command "docker pull openshift/origin-release".
Then I executed this in Docker shell:
docker run openshift/origin-release start
And I'm unable to start openshift, as I receive this error:
C:\Program Files\Docker Toolbox\docker.exe: Error response from daemon: OCI runtime create failed: container_linux.go:344: starting container process caused "exec: \"start\": executable file not found in $PATH": unknown.
From instruction on Docker HUB (https://hub.docker.com/r/openshift/origin-release/)
it's reported to : "If you have downloaded the client tools from the releases page, place the included binaries in your PATH."
How can I do that?
Thanks in advance for any advice

SSH, RabbitMQ, Protocol 'inet_tcp': register/listen error: econnrefused

When I try to run on my server machine command
./rabbitmq-server
I the get following:
WARNING: Removing trailing slash from RABBITMQ_LOG_BASE
Removing trailing slash from RABBITMQ_MNESIA_BASE
Protocol 'inet_tcp': register/listen error: econnrefused
Backstory:
This is my first time I'm trying to install RabbitMQ-Server just using ssh.
Step-by-step what I did so far would be:
wget https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.0/rabbitmq-server-3.6.15.zip
unzip rabbitmq-server-3.6.15.zip
nano Makefile # change prefix to rabbitMQ in home directory PREFIX ?= /home/user/rabbitmq
gmake
gmake install
cd ~/rabbitmq/lib/erlang/lib/rabbitmq_server-3.6.15/sbin/
export RABBITMQ_MNESIA_BASE=/home/user/rabbitmq/lib/erlang/lib/rabbitmq_server-3.6.15/sbin/
export RABBITMQ_LOG_BASE=/home/user/rabbitmq/
./rabbitmq-server
And here comes the error. I was told that maybe "unlocking" ports would do the trick, but
I don't know how to do that
I don't know if that's the case
The error Protocol 'inet_tcp': register/listen error: econnrefused means that the Erlang node tried to connect to epmd (the Erlang port mapper daemon) to register its name, but failed to connect.
That shouldn't happen: epmd should be started when the Erlang node starts up. You could try running epmd manually in the shell, and see if it reports any errors.
If it says failed to bind socket: Operation not permitted, check if something else is using port 4369 (which is the port that epmd tries to listen on).

Error:Unable to invoke action : The server is currently unavailable

I am doing a on prem setup of openwhisk using local couchdb installation on ubuntu 16.04 for which I downloaded the code from the github. I have followed all the steps of the setup, after the build, I have to run various playbooks
when is run the below playbook with the below command
ansible-playbook -i environments/local openwhisk.yml
I get error
"error": "The server is currently unavailable (because it is overloaded or down for maintenance).",
"code": 4
when I check I found it is coming while executing installRouteMgmt.sh from /openwhisk/ansible/roles/routemgmt/files
the line in the script which is throwing error is
enter code here`echo Installing routemgmt package.
$WSK_CLI -i -v --apihost "$APIHOST" package update --auth "$AUTH" --shared no "$NAMESPACE/routemgmt" \
-a description "This experimental package manages the gateway API configuration." \
-p gwUser "$GW_USER" \
-p gwPwd "$GW_PWD" \
-p gwUrl "$GW_HOST" \
-p gwUrlV2 "$GW_HOST_V2"
where
APIHOST=172.17.0.1
AUTH=path to auth.whisk.system
WSK_CLI= wsk path
NAMESPACE= whisk.system
This error comes when the DB host value is not resolvable from the controller container or when the DB which the controller trying to connect to is not created in the couch DB. Mine was the second case once __subjects db was there,
it was able to run