How I can contribute to eve-ng community edition ?
Moderator: mike
-
- Posts: 13
- Joined: Thu May 26, 2022 7:46 am
How I can contribute to eve-ng community edition ?
Hi,
I created a new script for Mikrotik RouterOS import/export however I was not able to find any information how can be contributed to eve-en.
I opened other discussion about it, for more info: viewtopic.php?f=3&t=20324
No idea why I received zero response under "EVE-NG Help-Desk " forum section
Here is the script: https://github.com/NikolayDachev/eve-ng
Regards,
I created a new script for Mikrotik RouterOS import/export however I was not able to find any information how can be contributed to eve-en.
I opened other discussion about it, for more info: viewtopic.php?f=3&t=20324
No idea why I received zero response under "EVE-NG Help-Desk " forum section
Here is the script: https://github.com/NikolayDachev/eve-ng
Regards,
-
- Posts: 5067
- Joined: Wed Mar 15, 2017 4:44 pm
- Location: London
- Contact:
Re: How I can contribute to eve-ng community edition ?
Your script is raw and not working as expected even to taking in account your Notes.
And to get lab lock is dangerous, risk to lost all lab after
Sorry but this script is not ok still
And to get lab lock is dangerous, risk to lost all lab after
Sorry but this script is not ok still
-
- Posts: 13
- Joined: Thu May 26, 2022 7:46 am
Re: How I can contribute to eve-ng community edition ?
I'm sorry but can you please be more specific what is not working as expected
What you mean with raw ?!
My notes are base not only on the my script (which is code around original code) but apply to the current eve-ng script for ros !
Also I'm not sure what you mea with "lock" !
The problem refer in my notes are related to the case for example when RouterOS admin password is set ! Again this apply to the current script !
So please be more specific,
What you mean with raw ?!
My notes are base not only on the my script (which is code around original code) but apply to the current eve-ng script for ros !
Also I'm not sure what you mea with "lock" !
The problem refer in my notes are related to the case for example when RouterOS admin password is set ! Again this apply to the current script !
So please be more specific,
-
- Posts: 13
- Joined: Thu May 26, 2022 7:46 am
Re: How I can contribute to eve-ng community edition ?
I just test ros 6.48.6 with the old script
Yes there is a differences however the old script just try to execute export commands via telnet without any checks (for example execute export cmd's on user login prompt)
I will check my script why do "login retry" which are cause this lab lock and will fix it.
Main point here is ..
If this script has an issue , I do not see nothing extraordinary, issue found , reported and will be fixed .. this is something normal.
If this script is not acceptable for other reasons than a issue was found then I don't see any reason to put efforts .. (so will be good for me to know)
The important is, someone to a make little effort to fix existing script for import/export routeros configuraition, I'm sure a lot of eve-ng users will appriciated it.
Yes there is a differences however the old script just try to execute export commands via telnet without any checks (for example execute export cmd's on user login prompt)
I will check my script why do "login retry" which are cause this lab lock and will fix it.
Main point here is ..
If this script has an issue , I do not see nothing extraordinary, issue found , reported and will be fixed .. this is something normal.
If this script is not acceptable for other reasons than a issue was found then I don't see any reason to put efforts .. (so will be good for me to know)
The important is, someone to a make little effort to fix existing script for import/export routeros configuraition, I'm sure a lot of eve-ng users will appriciated it.
-
- Posts: 13
- Joined: Thu May 26, 2022 7:46 am
Re: How I can contribute to eve-ng community edition ?
Script login issue when password is set is fixed
I put a note in github readme in order to not confusing users for this script with eve-ng official
I hope eve-ng team will fix Mikrotik import/export function some day
Regards,
I put a note in github readme in order to not confusing users for this script with eve-ng official
I hope eve-ng team will fix Mikrotik import/export function some day
Regards,
-
- Posts: 5067
- Joined: Wed Mar 15, 2017 4:44 pm
- Location: London
- Contact:
Re: How I can contribute to eve-ng community edition ?
I tried your updated script but its behave is same as before.
tested on EVE Pro.
I did and took in advice all your Notes,
twried not open console until this image is booting, but still same, node does not start from export
tested on EVE Pro.
I did and took in advice all your Notes,
twried not open console until this image is booting, but still same, node does not start from export
-
- Posts: 13
- Joined: Thu May 26, 2022 7:46 am
Re: How I can contribute to eve-ng community edition ?
So, really "not working" is not very useful information!
I still not able to understand what exactly not working
1. open console is not related to the script .. you can have open console without any issues (actually is recommended you can see what the script do in real time )
2. one of my note is to be sure the node is up and running before do export config.
The reason is very simple, the script is heavily related to timeouts. The idea is to be sure you see for example routeros login screen before click export config.
Also this is important since depend on your eve-ng resources (like cpu/ram) .. with more resources eve-ng nodes will but faster and vice versa .. will boot slower which directly effect the timeouts in question.
3. For import (aka add config on startup) .. This is active only once (this is not related to the script .. there is a lock file in the lab if the node is already configured ! ).
You can try to stop the node, wipe it and then start it in order the import start-config work.
for more info https://www.eve-ng.net/wp-content/uploa ... 1-2022.pdf
10.3.4 Boot nodes from exported config set
It will be very useful if you can provide logs from /opt/unetlab/data/Logs/unl_wrapper.txt
for example
export:
Dec 09 21:39:51 INFO: exporting /opt/unetlab/scripts/config_mikrotik.py -a get -p 32770 -f /tmp/unl_cfg_2_2EoMGD -t 45
Dec 09 21:39:51 DEBUG: lab saved
import: (startup-config on wipe node):
Dec 09 21:40:55 INFO: importing nohup /opt/unetlab/scripts/config_mikrotik.py -a put -p 32769 -f /opt/unetlab/tmp/0/4a00d157-781c-41ae-a30d-1ba1a6efab4a/1/startup-config -t 300 > /dev/null 2>&1 &
here is example if 'admin' user password is set (my fix is to make 3 times login retries .. in order to not loop the script in login process ):
Dec 09 21:45:15 INFO: exporting /opt/unetlab/scripts/config_mikrotik.py -a get -p 32779 -f /tmp/unl_cfg_11_xSetlJ -t 45
Dec 09 21:45:15 ERROR: Failed to export (80060).
Dec 09 21:45:15 ERROR: Failed to login via console login prompt after 3 login retries `admin pwd reset: /user/set admin password=""`
Dec 09 21:45:15 Dec 09 21:45:15 ERROR: Failed to export config (16).
NOTE: this script have additional custom parameters however it is not easy task to be implemented since eve-ng cli.php parameters are hardcoded !!
Will be good idea if eve-ng add a setting for custom scripts (free text ?!)for such operations, with that eve-ng team will be offloaded of work for node os specifics and users will be able to add their own ...
NOTE2: I did not test it for eve-ng pro version only for community edition .. I don't think there is differences for node configuration import/export scripts but I'm not sure as well !
NOTE3: I'm a single person ( aka only I work on this script ) and I do not have a time for testing , I think the script work without any issues, I test it with different scenarios, what can be a problem with the script .. if script try to export really huge routeros configuration !! I did not test that for sure .. no idea what will be the result
Regards,
I still not able to understand what exactly not working
1. open console is not related to the script .. you can have open console without any issues (actually is recommended you can see what the script do in real time )
2. one of my note is to be sure the node is up and running before do export config.
The reason is very simple, the script is heavily related to timeouts. The idea is to be sure you see for example routeros login screen before click export config.
Also this is important since depend on your eve-ng resources (like cpu/ram) .. with more resources eve-ng nodes will but faster and vice versa .. will boot slower which directly effect the timeouts in question.
3. For import (aka add config on startup) .. This is active only once (this is not related to the script .. there is a lock file in the lab if the node is already configured ! ).
You can try to stop the node, wipe it and then start it in order the import start-config work.
for more info https://www.eve-ng.net/wp-content/uploa ... 1-2022.pdf
10.3.4 Boot nodes from exported config set
It will be very useful if you can provide logs from /opt/unetlab/data/Logs/unl_wrapper.txt
for example
export:
Dec 09 21:39:51 INFO: exporting /opt/unetlab/scripts/config_mikrotik.py -a get -p 32770 -f /tmp/unl_cfg_2_2EoMGD -t 45
Dec 09 21:39:51 DEBUG: lab saved
import: (startup-config on wipe node):
Dec 09 21:40:55 INFO: importing nohup /opt/unetlab/scripts/config_mikrotik.py -a put -p 32769 -f /opt/unetlab/tmp/0/4a00d157-781c-41ae-a30d-1ba1a6efab4a/1/startup-config -t 300 > /dev/null 2>&1 &
here is example if 'admin' user password is set (my fix is to make 3 times login retries .. in order to not loop the script in login process ):
Dec 09 21:45:15 INFO: exporting /opt/unetlab/scripts/config_mikrotik.py -a get -p 32779 -f /tmp/unl_cfg_11_xSetlJ -t 45
Dec 09 21:45:15 ERROR: Failed to export (80060).
Dec 09 21:45:15 ERROR: Failed to login via console login prompt after 3 login retries `admin pwd reset: /user/set admin password=""`
Dec 09 21:45:15 Dec 09 21:45:15 ERROR: Failed to export config (16).
NOTE: this script have additional custom parameters however it is not easy task to be implemented since eve-ng cli.php parameters are hardcoded !!
Will be good idea if eve-ng add a setting for custom scripts (free text ?!)for such operations, with that eve-ng team will be offloaded of work for node os specifics and users will be able to add their own ...
NOTE2: I did not test it for eve-ng pro version only for community edition .. I don't think there is differences for node configuration import/export scripts but I'm not sure as well !
NOTE3: I'm a single person ( aka only I work on this script ) and I do not have a time for testing , I think the script work without any issues, I test it with different scenarios, what can be a problem with the script .. if script try to export really huge routeros configuration !! I did not test that for sure .. no idea what will be the result
Regards,
-
- Posts: 5067
- Joined: Wed Mar 15, 2017 4:44 pm
- Location: London
- Contact:
Re: How I can contribute to eve-ng community edition ?
Excuse me but all Cookbooks are written by me, Uldis Dzerkals
Therefore, I know what is running node and how to deal with initial cofiguration
Also I tested various timeouts to set even 1800 but result is same, Export works, but boot from exported not,
Original EVE script works 100% on the versions 6.47.6, 6.48.1, 6.48.6
Logs:
For newer Mikrotik versions 7.x we will check our script for next release
Therefore, I know what is running node and how to deal with initial cofiguration
Also I tested various timeouts to set even 1800 but result is same, Export works, but boot from exported not,
Original EVE script works 100% on the versions 6.47.6, 6.48.1, 6.48.6
Logs:
Code: Select all
Dec 10 09:59:40 INFO: importing nohup /opt/unetlab/config_scripts/config_mikrotik.py -a put -p 34465 -f /opt/unetlab/tmp/10/516ba4d5-b43e-4dd1-a1c2-6ea1358ddddb/5/startup-config -t 1800 > /dev/null 2>&1 &
Dec 10 09:59:40 INFO: started process is 3512155
Dec 10 09:59:40 INFO: starting systemctl show --property MainPID --value eveng_10@516ba4d5-b43e-4dd1-a1c2-6ea1358ddddb@5
Running as unit: eveng_10@516ba4d5-b43e-4dd1-a1c2-6ea1358ddddb@5.service
Dec 10 09:59:40 INFO: starting sudo systemd-run -G --no-block --property=ExecStopPost=/opt/unetlab/go/eve-clean --property=Environment=WDIR="/opt/unetlab/tmp/10/516ba4d5-b43e-4dd1-a1c2-6ea1358ddddb/5" --property=Environment=TYPE="qemu" --property=WorkingDirectory=/opt/unetlab/tmp/10/516ba4d5-b43e-4dd1-a1c2-6ea1358ddddb/5 --service-type=simple --uid=0 --gid=32768 --unit=eveng_10@516ba4d5-b43e-4dd1-a1c2-6ea1358ddddb@5 /opt/unetlab/wrappers/qemu_wrapper -C 34465 -T 10 -D 5 -t "Mikrotik" -F /opt/qemu-2.12.0/bin/qemu-system-x86_64 -d 0 -- -nographic -device e1000,addr=3.0,multifunction=on,netdev=net0,mac=50:0a:00:05:00:00 -netdev tap,id=net0,ifname=vun001000a00500,script=no -device e1000,addr=3.1,multifunction=on,netdev=net1,mac=50:0a:00:05:00:01 -netdev tap,id=net1,ifname=vun001000a00501,script=no -device e1000,addr=3.2,multifunction=on,netdev=net2,mac=50:0a:00:05:00:02 -netdev tap,id=net2,ifname=vun001000a00502,script=no -device e1000,addr=3.3,multifunction=on,netdev=net3,mac=50:0a:00:05:00:03 -netdev tap,id=net3,ifname=vun001000a00503,script=no -smp 1 -m 256 -name Mikrotik -uuid 4cfe4334-1545-4909-9cef-58da46808b62 -qmp unix:./qmp-sock,server,nowait -monitor unix:./mon-sock,server,nowait -monitor unix:./mon2-sock,server,nowait -hda hda.qcow2 -machine type=pc,accel=kvm -serial mon:stdio -nographic -no-user-config -nodefaults -display none -vga std -rtc base=utc
Dec 10 09:59:40 INFO: starting /opt/unetlab/wrappers/qemu_wrapper -C 34465 -T 10 -D 5 -t "Mikrotik" -F /opt/qemu-2.12.0/bin/qemu-system-x86_64 -d 0 -- -nographic -device e1000,addr=3.0,multifunction=on,netdev=net0,mac=50:0a:00:05:00:00 -netdev tap,id=net0,ifname=vun001000a00500,script=no -device e1000,addr=3.1,multifunction=on,netdev=net1,mac=50:0a:00:05:00:01 -netdev tap,id=net1,ifname=vun001000a00501,script=no -device e1000,addr=3.2,multifunction=on,netdev=net2,mac=50:0a:00:05:00:02 -netdev tap,id=net2,ifname=vun001000a00502,script=no -device e1000,addr=3.3,multifunction=on,netdev=net3,mac=50:0a:00:05:00:03 -netdev tap,id=net3,ifname=vun001000a00503,script=no -smp 1 -m 256 -name Mikrotik -uuid 4cfe4334-1545-4909-9cef-58da46808b62 -qmp unix:./qmp-sock,server,nowait -monitor unix:./mon-sock,server,nowait -monitor unix:./mon2-sock,server,nowait -hda hda.qcow2 -machine type=pc,accel=kvm -serial mon:stdio -nographic -no-user-config -nodefaults -display none -vga std -rtc base=utc
-
- Posts: 13
- Joined: Thu May 26, 2022 7:46 am
Re: How I can contribute to eve-ng community edition ?
Uldis,
I did not check that and for sure I was not have any attend to offensive someone !
I really wander why someone was not replays to me with something like this in my first post before couple of months
You can ignore the next in this comment .. is not something really important ... just
......................................................................................................
I still wonder what is the exact problem with your test. I don't see any problem in the logs (import only will log if fail to get console access).
Question, what routeros version was used for testing ?
I have some issues with 7.3.1 but they are not related to import/export ..
I boot from startup-config with routeros 7.6 , I take the config from real router and my script import and boot successful without any issues (917 configurations lines )!
Also the timeout which you mention is only if the script cannot find any login (aka as a general timeout )
Last,
Regards,
I did not check that and for sure I was not have any attend to offensive someone !
...Excuse me but all Cookbooks are written by me, Uldis Dzerkals
I really wander why someone was not replays to me with something like this in my first post before couple of months
Sorry to repeat my self but will be great if startup-config import/export function start to work with routeros 7.X (aslo 6.49.* !)For newer Mikrotik versions 7.x we will check our script for next release
You can ignore the next in this comment .. is not something really important ... just
......................................................................................................
I still wonder what is the exact problem with your test. I don't see any problem in the logs (import only will log if fail to get console access).
Question, what routeros version was used for testing ?
I have some issues with 7.3.1 but they are not related to import/export ..
I boot from startup-config with routeros 7.6 , I take the config from real router and my script import and boot successful without any issues (917 configurations lines )!
Also the timeout which you mention is only if the script cannot find any login (aka as a general timeout )
Last,
I just try to help since I believe import/export config is something important .. at leas for me .. and this is the reason why I create this scipt on firts place without any expectations, bells and whistles .. etc .
I agree that community is not eq to open source .. so this is fine for me as well
Probably readers of this post do not understand for what exactly we tailikng about here however all of them will agree with my stamet about importans of import/export config function in eve-ng.
Regards,
-
- Posts: 5067
- Joined: Wed Mar 15, 2017 4:44 pm
- Location: London
- Contact:
Re: How I can contribute to eve-ng community edition ?
I told you Mikrotik config script update is in our task list.
all problem is to manage that passord change properly on the script for 6.49.x and 7.x routers. And it is exactly what we are expecting to do.
most badly thing with Mikrotik is mess with MAC addresses order bound to the interfaces, for example first MAC address is assigned to ethernet randomly, and this is image issue not EVE, All new versions 7.x !!!
Mikrotik with 6 ethernets, MAC 00 is on eth4
Mikrotik with 8 ethernets, MAC 00 is on eth5
Versions 6.x up to 6.49.7 MAC order is ok
IP is configured on eth3, version 7.6
all problem is to manage that passord change properly on the script for 6.49.x and 7.x routers. And it is exactly what we are expecting to do.
most badly thing with Mikrotik is mess with MAC addresses order bound to the interfaces, for example first MAC address is assigned to ethernet randomly, and this is image issue not EVE, All new versions 7.x !!!
Mikrotik with 6 ethernets, MAC 00 is on eth4
Code: Select all
[admin@MikroTik] > interface/print
Flags: R - RUNNING
Columns: NAME, TYPE, ACTUAL-MTU, MAC-ADDRESS
# NAME TYPE ACTUAL-MTU MAC-ADDRESS
0 R ether1 ether 1500 50:0A:00:07:00:01
1 R ether2 ether 1500 50:0A:00:07:00:04
2 R ether3 ether 1500 50:0A:00:07:00:02
3 R ether4 ether 1500 50:0A:00:07:00:00
4 R ether5 ether 1500 50:0A:00:07:00:05
5 R ether6 ether 1500 50:0A:00:07:00:03
Code: Select all
[admin@MikroTik] > interface/print
Flags: R - RUNNING
Columns: NAME, TYPE, ACTUAL-MTU, MAC-ADDRESS
# NAME TYPE ACTUAL-MTU MAC-ADDRESS
0 R ether1 ether 1500 50:0A:00:06:00:01
1 R ether2 ether 1500 50:0A:00:06:00:06
2 R ether3 ether 1500 50:0A:00:06:00:04
3 R ether4 ether 1500 50:0A:00:06:00:02
4 R ether5 ether 1500 50:0A:00:06:00:00
5 R ether6 ether 1500 50:0A:00:06:00:07
6 R ether7 ether 1500 50:0A:00:06:00:05
7 R ether8 ether 1500 50:0A:00:06:00:03
Code: Select all
[admin@MikroTik] > interface print
Flags: D - dynamic, X - disabled, R - running, S - slave
# NAME TYPE ACTUAL-MTU L2MTU MAX-L2MTU MAC-ADDRESS
0 R ether1 ether 1500 50:0A:00:06:00:00
1 R ether2 ether 1500 50:0A:00:06:00:01
2 R ether3 ether 1500 50:0A:00:06:00:02
3 R ether4 ether 1500 50:0A:00:06:00:03
4 R ether5 ether 1500 50:0A:00:06:00:04
5 R ether6 ether 1500 50:0A:00:06:00:05
6 R ether7 ether 1500 50:0A:00:06:00:06
7 R ether8 ether 1500 50:0A:00:06:00:07
[admin@MikroTik] >
You do not have the required permissions to view the files attached to this post.