You are here: Home / Projects / EVE / eveadm / tests / Testing test_domainmgr.py on Ubuntu Desktop 18.04. February 19, 2020 / test_domainmgr.py-testing-20200219

test_domainmgr.py-testing-20200219

by Elena Korytko last modified Feb 20, 2020 09:48 AM
Testing test_domainmgr.py on Ubuntu Desktop 18.04. February 19, 2020

Host machine:

Intel(R) Core(TM) i5-3317U CPU @ 1.70GHz
MemTotal:        3852592 kB
Ubuntu Desktop 18.04

At host machine:

cd eveadm
git pull
cd tests

Run run_local_eve.sh with 2500 Mb:

sudo ./run_local_eve.sh -m 2500

After the question

Do you want to cleanup? (y/n)

I didn’t press any keys.

 

Go to eve with ssh (comand from result execute run_local_eve.sh):

sudo ssh -p 49312 127.0.0.1

 

Failed connecting with ssh. Reboot make run:

root@user-V5-171:/tmp/eveadam-2020-02-19-10-36-36-obwRkdZpbY/eve# TZ=GMT make ACCEL=true SSH_PORT=49312 run

 

Run "sudo ./test_domainmgr.py 49312"

user@user-V5-171:~/eveadm/tests$ sudo ./test_domainmgr.py 49312
[sudo] password for user:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pexpect/spawnbase.py", line 150, in read_nonblocking
    s = os.read(self.child_fd, size)
OSError: [Errno 5] Input/output error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pexpect/expect.py", line 99, in expect_loop
    incoming = spawn.read_nonblocking(spawn.maxread, timeout)
  File "/usr/lib/python3/dist-packages/pexpect/pty_spawn.py", line 465, in read_nonblocking
    return super(spawn, self).read_nonblocking(size)
  File "/usr/lib/python3/dist-packages/pexpect/spawnbase.py", line 155, in read_nonblocking
    raise EOF('End Of File (EOF). Exception style platform.')
pexpect.exceptions.EOF: End Of File (EOF). Exception style platform.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./test_domainmgr.py", line 13, in 
    eve.expect('\(ns: pillar\) (.*):/#')
  File "/usr/lib/python3/dist-packages/pexpect/spawnbase.py", line 321, in expect
    timeout, searchwindowsize, async)
  File "/usr/lib/python3/dist-packages/pexpect/spawnbase.py", line 345, in expect_list
    return exp.expect_loop(timeout)
  File "/usr/lib/python3/dist-packages/pexpect/expect.py", line 105, in expect_loop
    return self.eof(e)
  File "/usr/lib/python3/dist-packages/pexpect/expect.py", line 50, in eof
    raise EOF(msg)
pexpect.exceptions.EOF: End Of File (EOF). Exception style platform.

command: /usr/bin/ssh
args: ['/usr/bin/ssh', '-p', '49312', 'localhost']
buffer (last 100 chars): b''
before (last 100 chars): b'alhost]:49312 has changed and you have requested strict checking.\r\r\nHost key verification failed.\r\r\n'
after: <class 'pexpect.exceptions.EOF'>
match: None
match_index: None
exitstatus: 255
flag_eof: True
pid: 32760
child_fd: 5
closed: False
timeout: None
delimiter: <class 'pexpect.exceptions.EOF'>
logfile: None
logfile_read: None
logfile_send: None
maxread: 2000
ignorecase: False
searchwindowsize: None
delaybeforesend: 0.05
delayafterclose: 0.1
delayafterterminate: 0.1
searcher: searcher_re:
    0: re.compile("b'\\(ns: pillar\\) (.*):/#'")

Host key verification failed.

Go to eve with ssh again: 

root@user-V5-171:~# ssh -p 49312 localhost
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256:R3exjYadxyE5AzSDb/tnSKK0FcrcvmplwUyvUxhCg6I.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /root/.ssh/known_hosts:7
  remove with:
  ssh-keygen -f "/root/.ssh/known_hosts" -R "[localhost]:49312"
ECDSA host key for [localhost]:49312 has changed and you have requested strict checking.
Host key verification failed.

Run  ssh-keygen -f "/root/.ssh/known_hosts" -R "[localhost]:49312"

root@user-V5-171:~# ssh-keygen -f "/root/.ssh/known_hosts" -R "[localhost]:49312"
# Host [localhost]:49312 found: line 7
/root/.ssh/known_hosts updated.
Original contents retained as /root/.ssh/known_hosts.old
root@user-V5-171:~# ssh -p 49312 localhost
The authenticity of host '[localhost]:49312 ([127.0.0.1]:49312)' can't be established.
ECDSA key fingerprint is SHA256:R3exjYadxyE5AzSDb/tnSKK0FcrcvmplwUyvUxhCg6I.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[localhost]:49312' (ECDSA) to the list of known hosts.
(ns: pillar) 607683f0-77db-4497-8a56-b2ff6298018d:/#

 

On browser:

https://zedcontrol.zededa.net/edge-nodes/add

Node settings:

Name - kor01
Title - test mode 01
Project - default-project
Identify Type - Onboarding Key
Brand - ZedVertualDevice
Onboarding Key - insert key from result execute run_local_eve.sh
Model - ZedVirtual-4G
Serial Number - insert number from result execute run_local_eve.sh
Network - defaultIPv4-net (for both interfaces)

Selected "Activate Edge Node" on bottom left of the screen.

Pressed "Add".

 

Run test_domainmgr.py:

user@user-V5-171:~/eveadm/tests$ sudo ./test_domainmgr.py 49312

 

Creating mqtt-eclipse-broker app


On browser:

https://zedcontrol.zededa.net/edge-apps/store/b4c96209-fdf8-40dc-867f-cf67639cd8b9/details/info

pressed "Deploy Edge App"  on top right of the screen.

Application settings:

Name - kora011
Title - test application 011
Edge Node - select kor01
Edge App - mqtt-eclipse-broker (selected by default)
Network Instance - defaultLocal-kor01 (selected by default)

Pressed "Add" on bottom right of the screen.

As a result status of my node kor01 "Online", status of my application kora011 "Error".

Log test_domainmgr.py with actions marks Create, Stop, Start, Delete:

user@user-V5-171:~/eveadm/tests$ sudo ./test_domainmgr.py 49312
domainmgr PID:  2110


Create


(2020-02-19T20:02:34.004653798Z) kora011 Activated: False
(2020-02-19T20:02:34.028651908Z) kora011 Activated: False
(2020-02-19T20:03:54.16550189Z ) kora011 Activated: False
(2020-02-19T20:06:09.791866023Z) kora011 Activated: False
(2020-02-19T20:08:25.126990471Z) kora011 Activated: False Error: 'unable to create mountPointFile: createMountPointFile: Number of volumes provided: 0 is less than number of mount-points: 2. ' (2020-02-19T20:08:25.125967491Z)
(2020-02-19T20:08:25.1278363Z  ) kora011 Activated: False Error: 'unable to create mountPointFile: createMountPointFile: Number of volumes provided: 0 is less than number of mount-points: 2. ' (2020-02-19T20:08:25.125967491Z)


Stop


(2020-02-19T20:11:43.756887885Z) kora011 Activated: False Error: 'unable to create mountPointFile: createMountPointFile: Number of volumes provided: 0 is less than number of mount-points: 2. ' (2020-02-19T20:08:25.125967491Z)
(2020-02-19T20:11:43.793003384Z) kora011 Activated: False
(2020-02-19T20:11:45.019441308Z) kora011 Activated: False
(2020-02-19T20:11:45.021198701Z) kora011 Activated: False


(2020-02-19T20:13:18.268702118Z) kora011 Activated: False Error: 'unable to create mountPointFile: createMountPointFile: Number of volumes provided: 0 is less than number of mount-points: 2. ' (2020-02-19T20:13:18.268007374Z)
(2020-02-19T20:24:22.960018847Z) kora011 Activated: False Error: 'unable to create mountPointFile: createMountPointFile: Number of volumes provided: 0 is less than number of mount-points: 2. ' (2020-02-19T20:24:22.959391118Z)
(2020-02-19T20:35:35.760925397Z) kora011 Activated: False Error: 'unable to create mountPointFile: createMountPointFile: Number of volumes provided: 0 is less than number of mount-points: 2. ' (2020-02-19T20:35:35.759536194Z)
(2020-02-19T20:46:55.786749339Z) kora011 Activated: False Error: 'unable to create mountPointFile: createMountPointFile: Number of volumes provided: 0 is less than number of mount-points: 2. ' (2020-02-19T20:46:55.7860897Z)



Start


(2020-02-19T20:54:16.326758206Z) kora011 Activated: False Error: 'unable to create mountPointFile: createMountPointFile: Number of volumes provided: 0 is less than number of mount-points: 2. ' (2020-02-19T20:46:55.7860897Z)
(2020-02-19T20:54:16.345710965Z) kora011 Activated: False
(2020-02-19T20:55:35.691454936Z) kora011 Activated: False
(2020-02-19T20:57:32.740346033Z) kora011 Activated: False
(2020-02-19T20:59:27.457272524Z) kora011 Activated: False Error: 'unable to create mountPointFile: createMountPointFile: Number of volumes provided: 0 is less than number of mount-points: 2. ' (2020-02-19T20:59:27.456601963Z)
(2020-02-19T20:59:27.458169479Z) kora011 Activated: False Error: 'unable to create mountPointFile: createMountPointFile: Number of volumes provided: 0 is less than number of mount-points: 2. ' (2020-02-19T20:59:27.456601963Z)



Delete


(2020-02-19T21:01:33.741212325Z) kora011 Activated: False Error: 'unable to create mountPointFile: createMountPointFile: Number of volumes provided: 0 is less than number of mount-points: 2. ' (2020-02-19T20:59:27.456601963Z)
(2020-02-19T21:01:33.865632711Z) kora011 Activated: False Error: 'unable to create mountPointFile: createMountPointFile: Number of volumes provided: 0 is less than number of mount-points: 2. ' (2020-02-19T20:59:27.456601963Z)

 

mqtt-eclipse-broker_kora11-create.jpg

Create application mqtt-eclipse-broker

 

mqtt-eclipse-broker_kora11-stop.jpg

Stop application mqtt-eclipse-broker

 

mqtt-eclipse-broker_kora11-start.jpg

Start application mqtt-eclipse-broker

 

Creating ubuntu-xenial-16.04 app

 

On browser:

https://zedcontrol.zededa.net/edge-apps/store/list

Selected ubuntu-xenial-16.04.

Pressed "Deploy Edge App".

Application settings:

Name - kora011
Title - test application 011
Edge Node - select kor01
Edge App - ubuntu-xenial-16.04 (selected by default)
Network Instance - defaultLocal-kor01 (selected by default)

Pressed "Add".

As a result status of my application kora011 "Online".

Log test_domainmgr.py with actions marks Create, Stop, Start, Delete:

user@user-V5-171:~/eveadm/tests$ sudo ./test_domainmgr.py 49312
[sudo] password for user: 
domainmgr PID:  11598
(2020-02-19T23:11:07.906213136Z) kora011 Activated: False
(2020-02-19T23:13:19.740402395Z) kora011 Activated: False
(2020-02-19T23:13:25.018861733Z) kora011 Activated: True
(2020-02-19T23:13:25.450816254Z) kora011 Activated: True



Stop                                                                                                                                                                                            

(2020-02-19T23:18:57.684402938Z) kora011 Activated: True
(2020-02-19T23:18:57.727860011Z) kora011 Activated: True
(2020-02-19T23:19:13.196190147Z) kora011 Activated: False
(2020-02-19T23:19:13.1981983Z  ) kora011 Activated: False


Start


(2020-02-19T23:31:28.080381999Z) kora011 Activated: False
(2020-02-19T23:31:32.344312591Z) kora011 Activated: True
(2020-02-19T23:31:32.72669496Z ) kora011 Activated: True


Delete


(2020-02-19T23:35:35.495558074Z) kora011 Activated: True
(2020-02-19T23:35:35.538873503Z) kora011 Activated: True
(2020-02-19T23:36:14.493140103Z) kora011 Activated: False
(2020-02-19T23:36:14.761932625Z) kora011 Activated: False

 ubuntu-xenial-16.04-create.jpg

Create application ubuntu-xenial-16.04

 

ubuntu-xenial-16.04-stop.jpg

Stop application ubuntu-xenial-16.04

 

ubuntu-xenial-16.04-start.jpg

Start application ubuntu-xenial-16.04

Navigation