Page MenuHomeVyOS Platform
Feed Advanced Search

May 26 2020

thomas-mangin updated the task description for T2522: Python CLI.
May 26 2020, 2:03 PM · VyOS 1.3 Equuleus
thomas-mangin claimed T2522: Python CLI.
May 26 2020, 1:55 PM · VyOS 1.3 Equuleus
thomas-mangin created T2522: Python CLI.
May 26 2020, 1:54 PM · VyOS 1.3 Equuleus

May 24 2020

thomas-mangin added a comment to T2501: Cannot recover from failed boot config load.

The called code can return 3 - in that case in that case _run should return an empty string

May 24 2020, 9:51 AM · VyOS 1.3 Equuleus

May 23 2020

thomas-mangin added a comment to T2457: IPv6 ping by address not working.
diff --git a/src/op_mode/ping.py b/src/op_mode/ping.py
index 45b06aa9..f723933b 100644
--- a/src/op_mode/ping.py
+++ b/src/op_mode/ping.py
@@ -210,7 +210,7 @@ if __name__ == '__main__':
     try:
         ip = socket.gethostbyname(host)
     except socket.gaierror:
-        sys.exit(f'ping: Unknown host: {host}')
+        ip = host
May 23 2020, 5:34 PM
thomas-mangin added a comment to T2499: expose the configuration loading function.

https://github.com/vyos/vyos-1x/pull/422/files

May 23 2020, 5:48 AM · VyOS 1.3 Equuleus
thomas-mangin claimed T2499: expose the configuration loading function.
May 23 2020, 5:24 AM · VyOS 1.3 Equuleus
thomas-mangin created T2499: expose the configuration loading function.
May 23 2020, 5:24 AM · VyOS 1.3 Equuleus

May 22 2020

thomas-mangin added a comment to T2494: systemd dependencies issues.

It causes this:

9140 ?        Ss     0:00 /bin/bash /usr/libexec/vyos/init/vyos-router start
 9427 ?        S      0:00  \_ /bin/bash /usr/libexec/vyos/init/vyos-router start
 9428 ?        S      0:00      \_ python3 /usr/libexec/vyos/vyos-boot-config-loader.py /opt/vyatta/etc/config/config.boot
 9451 ?        S      0:00          \_ /opt/vyatta/sbin/my_commit
 9522 ?        S      0:00              \_ sudo sh -c VYOS_TAGNODE_VALUE='eth0' /usr/libexec/vyos/conf_mode/interfaces-ethernet.py
 9523 ?        Sl     0:00                  \_ python3 /usr/libexec/vyos/conf_mode/interfaces-ethernet.py
 9531 ?        R      0:00                      \_ /bin/cli-shell-api --show-active-only --show-show-defaults --show-ignore-edit showConfig
May 22 2020, 3:12 PM · VyOS 1.3 Equuleus
thomas-mangin added a comment to T2494: systemd dependencies issues.
[Unit]
Description=VyOS HTTP API service
May 22 2020, 2:29 PM · VyOS 1.3 Equuleus
thomas-mangin claimed T2494: systemd dependencies issues.
May 22 2020, 2:22 PM · VyOS 1.3 Equuleus
thomas-mangin created T2494: systemd dependencies issues.
May 22 2020, 2:10 PM · VyOS 1.3 Equuleus

May 21 2020

thomas-mangin closed T2475: linting as Resolved.
May 21 2020, 9:13 PM · VyOS 1.3 Equuleus
thomas-mangin added a comment to T2486: DNS records set via 'system static-host-mapping' return NXDOMAIN from 'service dns forwarding' after a request to a forwarded zone.
vyos@vyos:~$ dpkg -l | grep pdns
ii  pdns-recursor                    4.2.1-1pdns.buster                  amd64        PowerDNS Recursor
May 21 2020, 12:00 PM · VyOS 1.3 Equuleus

May 20 2020

thomas-mangin claimed T2431: Python validators are slow.
May 20 2020, 7:53 PM · VyOS 1.3 Equuleus
thomas-mangin added a comment to T2431: Python validators are slow.

related to T2088 where performance is also being discussed.

May 20 2020, 7:52 PM · VyOS 1.3 Equuleus
thomas-mangin claimed T2407: alternate installation for the vyos-1x python code.
May 20 2020, 7:51 PM · VyOS 1.1.x
thomas-mangin added a comment to T2484: Migrate ConfigurationState out of interface-tunnel.

waiting for a decision on T2485 before doing this work

May 20 2020, 7:44 PM · VyOS 1.3 Equuleus
thomas-mangin added a comment to T2485: move all the configuration code in a configuration folder.

https://github.com/vyos/vyos-1x/pull/418

May 20 2020, 7:38 PM · VyOS 1.3 Equuleus
thomas-mangin added a comment to T2479: split the util file.

I have worked and provided a patch for T2485 .. It may be the right place to move it in.

May 20 2020, 7:37 PM · VyOS 1.3 Equuleus
thomas-mangin added a comment to T2088: Increased boot time from 1.2.4 -> 1.3 rolling by 100%.

https://docs.google.com/document/d/1pKkxwq5eBm9eSTmyrSluDU1cx8NYqQRkQNdTB1tCSdk/edit?usp=sharing

May 20 2020, 7:29 PM · VyOS 1.3 Equuleus
thomas-mangin added a comment to T2088: Increased boot time from 1.2.4 -> 1.3 rolling by 100%.

Every call to /bin/cli-shell-api --show-working-only --show-show-defaults --show-ignore-edit showConfig takes multiples seconds (6?)
/usr/libexec/vyos/conf_mode/system-timezone.py call it twice.
/usr/libexec/vyos/conf_mode/nat.py call it twice
/usr/libexec/vyos/conf_mode/interfaces-loopback.py call it twice ... etc.

May 20 2020, 4:59 PM · VyOS 1.3 Equuleus
thomas-mangin claimed T2485: move all the configuration code in a configuration folder.
May 20 2020, 11:22 AM · VyOS 1.3 Equuleus
thomas-mangin created T2485: move all the configuration code in a configuration folder.
May 20 2020, 11:22 AM · VyOS 1.3 Equuleus
thomas-mangin claimed T2484: Migrate ConfigurationState out of interface-tunnel.
May 20 2020, 11:20 AM · VyOS 1.3 Equuleus
thomas-mangin created T2484: Migrate ConfigurationState out of interface-tunnel.
May 20 2020, 11:18 AM · VyOS 1.3 Equuleus
thomas-mangin added a comment to T2088: Increased boot time from 1.2.4 -> 1.3 rolling by 100%.

0-18 kernel boot
18-41 system starting inc FRR
70-120 the python most of the time is spend/wasted in cli-shell-api - so I would think reading the configuration file. If we can optimise / reduce this number of calls it would be very good.
140-220 is more or less firewall setup with vyatta-firewall / vyatta-upset.pl / ip6tables

May 20 2020, 7:19 AM · VyOS 1.3 Equuleus

May 19 2020

thomas-mangin added a comment to T2474: Building instructions with Docker need a little more detail.

I need to double-check (and may not get to it) but if you use a vyos-build to build current and then try to build crux, make iso is not happy. I am now building crux using the command in my post above, the only difference: clean vyos-build install before the git checkout crux.

May 19 2020, 10:35 PM
thomas-mangin created T2479: split the util file.
May 19 2020, 4:18 PM · VyOS 1.3 Equuleus

May 18 2020

thomas-mangin added a comment to T2474: Building instructions with Docker need a little more detail.

ediing vyos make iso -r crux -d
https://github.com/thomas-mangin/vyos-hacker-toolkit

May 18 2020, 9:30 PM
thomas-mangin added a comment to T2474: Building instructions with Docker need a little more detail.

Last time I generate crux I used the docker current to do it ...
(but I could not this time...)

May 18 2020, 8:30 PM
thomas-mangin added a comment to T2475: linting.

https://github.com/vyos/vyos-1x/pull/412

May 18 2020, 4:42 PM · VyOS 1.3 Equuleus
thomas-mangin added a comment to T2475: linting.

@runar just created this as I can not create a dev env without a phabricator entry. answer in 20 minutes :-)

May 18 2020, 4:33 PM · VyOS 1.3 Equuleus
thomas-mangin claimed T2475: linting.
May 18 2020, 4:33 PM · VyOS 1.3 Equuleus
thomas-mangin created T2475: linting.
May 18 2020, 4:28 PM · VyOS 1.3 Equuleus

May 17 2020

thomas-mangin added a comment to T2467: Restarting Flow Accounting Fails.

The run code could check the command name against a list of known "need sudo" commands and prepend it automagically so the command looks like normal but is auto-sudo'ed

May 17 2020, 6:59 PM · VyOS 1.3 Equuleus

May 13 2020

thomas-mangin added a comment to T2453: Improve serial console (add options to auto-detect or hard-set terminal size).

https://github.com/joejulian/xterm/blob/master/resize.c Not complicated to port in the vyos library, replacing the current code and therefore only run when required

May 13 2020, 8:49 AM · VyOS 1.3 Equuleus

May 12 2020

thomas-mangin added a comment to T2453: Improve serial console (add options to auto-detect or hard-set terminal size).

Should we trap the signal in vash, set an env value and use it with vyos?

May 12 2020, 9:23 PM · VyOS 1.3 Equuleus

May 10 2020

thomas-mangin added a comment to T2442: Move application of STP settings for bridge members from interfaces-bridge.py to Interface.add_to_bridge().

If enable is not clear as a name to say that it adds the feature to the class, it is a class decorator, then please suggest a better name.

May 10 2020, 9:30 AM · VyOS 1.3 Equuleus
thomas-mangin closed T2372: VLAN: error on commit if main interface is disabled as Resolved.
May 10 2020, 9:27 AM · VyOS 1.3 Equuleus
thomas-mangin added a comment to T2366: change the default for Interface creation to False.

I will look into the use case and see if I can think of something.

May 10 2020, 9:23 AM

May 9 2020

thomas-mangin added a comment to T2433: Increase performance using unix socket.

I have implemented a "validator program" which is an entry point which will locate a named python program and run it. It uses the import mechanism of python at startup so the setup time is very high.

May 9 2020, 5:02 PM · VyOS 1.3 Equuleus
thomas-mangin added a comment to T2404: change mtu .

I raised this with the team and the idea of auto-detection does not get much support, which is fine, I just wanted to make sure I was doing the right thing. So I will finish this patch which will prevent some failure case and try to make the error message friendlier. Also, can look at where in the chain of change the MTU is performed to see if it can be rolled back.

May 9 2020, 12:42 PM · VyOS 1.3 Equuleus

May 8 2020

thomas-mangin added a comment to T2417: Python validator cleanup.

https://github.com/vyos/vyos-1x/pull/395

May 8 2020, 11:51 AM · VyOS 1.3 Equuleus
thomas-mangin reopened T2417: Python validator cleanup as "In progress".
May 8 2020, 11:50 AM · VyOS 1.3 Equuleus
thomas-mangin created T2437: New Config Code in the library.
May 8 2020, 10:53 AM
thomas-mangin added a comment to T2409: At boot, effective config should not be equal to current config.

@jjakob it does nothing about the boot case but it would be much easier to add it to that code than what we do ATM.

May 8 2020, 10:51 AM · VyOS 1.3 Equuleus
thomas-mangin added a comment to T2436: equuleus: Testing: vyos-1x: syntax checking python scripts in PR.

It seems that github has special rules for the .github file and that no PR can be done for it:
https://github.com/thomas-mangin/vyos-1x/blob/T2436/.github/workflows/pythonapp.yml

May 8 2020, 10:22 AM
thomas-mangin added a comment to T2436: equuleus: Testing: vyos-1x: syntax checking python scripts in PR.

I would also suggest doing the same using github actions so that on push to your local repository to get a warning from github.

May 8 2020, 9:54 AM
thomas-mangin added a comment to T2372: VLAN: error on commit if main interface is disabled.

Why do we need to remove all addresses from the interface when it is disabled?

May 8 2020, 9:43 AM · VyOS 1.3 Equuleus
thomas-mangin closed T2417: Python validator cleanup as Resolved.
May 8 2020, 9:42 AM · VyOS 1.3 Equuleus
thomas-mangin added a comment to T2409: At boot, effective config should not be equal to current config.

Can I throw https://github.com/vyos/vyos-1x/blob/current/src/conf_mode/interfaces-tunnel.py#L32 into the mix?

May 8 2020, 9:26 AM · VyOS 1.3 Equuleus

May 7 2020

thomas-mangin updated the task description for T2407: alternate installation for the vyos-1x python code.
May 7 2020, 9:14 PM · VyOS 1.1.x
thomas-mangin added a comment to T2407: alternate installation for the vyos-1x python code.

How this can be implemented in practice was tested with https://github.com/thomas-mangin/vyos-extra

  • the program can be installed using pip/setuptools and the "vyosextra.main:main" entry point, generating a "vyos" program.
  • the "release" program in the root folder generates a self-contained executable (using the builtin python3 zipapp library) which can be place before in the path, taking precedence over the installed version.
  • each feature "vyos ssh", "vyos update" is a single program and could be installed independently using other entry points
  • dropping a program in the folder automatically registers it to the main "vyos" program, each program has a "def main()" with a docstring used for the "-h"
  • the assets in the data folder are converted into python dict and used when the program is a zipapp.
May 7 2020, 9:13 PM · VyOS 1.1.x
thomas-mangin created T2433: Increase performance using unix socket.
May 7 2020, 8:41 PM · VyOS 1.3 Equuleus
thomas-mangin added a comment to T2425: Rewrite policy prefix-list to XML/Python style.

@jjakob I was going to offer to do so this week if people agreed to give me a chance to show good it could be.

May 7 2020, 1:20 PM · VyOS 1.3 Equuleus
thomas-mangin added a comment to T2425: Rewrite policy prefix-list to XML/Python style.

Using shell scripts would be a step back. The biggest part of the python script is the parsing of the vyos code. That's why I am suggesting that vyos command should be sent to a python daemon.
We can connect to it using IPC, and this can be done via a small C wrapper (or even directly in the caller's code to not even fork).

vyos@vyos# time bash -c ""
May 7 2020, 1:16 PM · VyOS 1.3 Equuleus
thomas-mangin added a comment to T2404: change mtu .

I was also wondering if we should attempt an auto-detection of MTU on boot and save the result? This is why I was asking if this was the right approach.

May 7 2020, 11:41 AM · VyOS 1.3 Equuleus

May 6 2020

thomas-mangin added a comment to T2404: change mtu .

Not sure if this is the right approach or not. Feedback welcomed.

May 6 2020, 11:44 PM · VyOS 1.3 Equuleus
thomas-mangin claimed T2426: vymgmt unparsable output.
May 6 2020, 3:27 PM · Python Management Library
thomas-mangin added a comment to T2426: vymgmt unparsable output.

https://github.com/vyos/vyos-1x/pull/394

May 6 2020, 3:27 PM · Python Management Library
thomas-mangin added a comment to T2407: alternate installation for the vyos-1x python code.
May 6 2020, 8:06 AM · VyOS 1.1.x
thomas-mangin edited projects for T2407: alternate installation for the vyos-1x python code, added: VyOS 1.1.x; removed VyOS 2.0.x.
May 6 2020, 8:05 AM · VyOS 1.1.x

May 5 2020

thomas-mangin added a comment to T2426: vymgmt unparsable output.

ack - I will change this to make sure it is safe !

May 5 2020, 6:35 PM · Python Management Library

May 3 2020

thomas-mangin added a comment to T2404: change mtu .

Some code should also be added to detect the parent MTU size and make sure a clan MTU is smaller than the parent

May 3 2020, 8:15 PM · VyOS 1.3 Equuleus
thomas-mangin added a comment to T2404: change mtu .

The mtu provided are reasonable and should not fail IMHO. I need to understand why Linux does not want to honour it.. hw limitation or other. If it is a limitation then we should detect it and report it to the user

May 3 2020, 8:05 PM · VyOS 1.3 Equuleus
thomas-mangin added a comment to T2404: change mtu .

That would only hide the problem. The MTU bug would still be here.

May 3 2020, 8:03 PM · VyOS 1.3 Equuleus
thomas-mangin added a comment to T2404: change mtu .

An issue to change the MTU should not fail the whole interface change but just this one but the code does not not allow this easily. I will try to work on this.

May 3 2020, 7:24 PM · VyOS 1.3 Equuleus
thomas-mangin added a comment to T2404: change mtu .

The reason seems to be that when the kernel can not change the MTU when writing to the sysfs, it will raise a OSError with the reason why.

May 3 2020, 4:59 PM · VyOS 1.3 Equuleus

May 2 2020

thomas-mangin created T2417: Python validator cleanup.
May 2 2020, 2:37 PM · VyOS 1.3 Equuleus

Apr 30 2020

thomas-mangin updated the task description for T2407: alternate installation for the vyos-1x python code.
Apr 30 2020, 7:08 PM · VyOS 1.1.x
thomas-mangin created T2407: alternate installation for the vyos-1x python code.
Apr 30 2020, 6:35 PM · VyOS 1.1.x

Apr 28 2020

thomas-mangin added a comment to T2394: dhcpv6 client does not start.

I had already reported before my refactor of the code that DHCPv6 does not work.
https://phabricator.vyos.net/T2268

Apr 28 2020, 6:53 PM · VyOS 1.3 Equuleus
thomas-mangin added a comment to T2394: dhcpv6 client does not start.

http://man7.org/linux/man-pages/man8/start-stop-daemon.8.html

EXIT STATUS
Apr 28 2020, 6:47 PM · VyOS 1.3 Equuleus
thomas-mangin added a comment to T2214: BGP peers dropping randomly.

https://vincent.bernat.ch/en/blog/2017-ipv6-route-lookup-linux

Apr 28 2020, 6:41 PM · VyOS 1.2 Crux
thomas-mangin added a comment to T2214: BGP peers dropping randomly.

Marek Isalski Today at 6:31 PM

Apr 28 2020, 6:38 PM · VyOS 1.2 Crux
thomas-mangin added a comment to T2184: OpenVPN op_mode tools broken.
vyos@vyos:~$ show interfaces openvpn vtun1
vtun1: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 100
    link/none
    inet 127.0.0.1 peer 10.255.1.2/32 scope host vtun1
       valid_lft forever preferred_lft forever
    inet6 fe80::a6ba:dc03:94c5:6b42/64 scope link stable-privacy
       valid_lft forever preferred_lft forever
Apr 28 2020, 10:58 AM · VyOS 1.3 Equuleus
thomas-mangin added a comment to T2184: OpenVPN op_mode tools broken.

@jjakob sorry for wasting your time here :-( I will try to replicate.

Apr 28 2020, 8:57 AM · VyOS 1.3 Equuleus

Apr 27 2020

thomas-mangin added a comment to T2214: BGP peers dropping randomly.

@Merjin is trying this:

sudo sysctl -w net.ipv6.route.max_size=131072

https://serverfault.com/questions/902161/linux-host-randomly-stops-answering-ipv6-neighbor-solicitation-requests
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=861115

Apr 27 2020, 3:29 PM · VyOS 1.2 Crux
thomas-mangin added a comment to T2390: unify the chmod_ function of VyOS.

To explain the permission for the user/group/world are expressed in octal (3 bits) so 755 is binary for 111 101 101

Apr 27 2020, 2:47 PM · VyOS 1.3 Equuleus
thomas-mangin added a comment to T2184: OpenVPN op_mode tools broken.

@jjakob can we close this task ?

Apr 27 2020, 2:03 PM · VyOS 1.3 Equuleus
thomas-mangin added a comment to T2388: template rendering should create folder and set permission.

https://github.com/vyos/vyos-1x/pull/381

Apr 27 2020, 11:18 AM · VyOS 1.3 Equuleus
thomas-mangin created T2390: unify the chmod_ function of VyOS.
Apr 27 2020, 10:36 AM · VyOS 1.3 Equuleus
thomas-mangin added a comment to T2363: Use pyroute2 instead of calling 'ip'.

Should a iproute.py wrapper be considered to prevent having calls to "ip" everywhere in the code?
Therefore if at a later date a better solution comes along the calls to binary would not be everywhere in the code ?

Apr 27 2020, 10:22 AM
thomas-mangin added a comment to T2363: Use pyroute2 instead of calling 'ip'.

Fair enough. I have gone thought the bug tracker of pyroute2 and indeed it does not inspire confidence!

Apr 27 2020, 10:20 AM

Apr 26 2020

thomas-mangin added a comment to T2214: BGP peers dropping randomly.

any L2/L3 issue affecting TCP between the BGP speaker will cause this message. Looking forward to a TCP dump of the traffic when it occurs.

Apr 26 2020, 10:53 PM · VyOS 1.2 Crux
thomas-mangin created T2388: template rendering should create folder and set permission.
Apr 26 2020, 10:05 PM · VyOS 1.3 Equuleus
thomas-mangin added a comment to T2379: But when I get DHCPv6 address for interface deletion, script execution error occurs.

https://github.com/vyos/vyos-1x/pull/380

Apr 26 2020, 9:48 PM · VyOS 1.3 Equuleus
thomas-mangin closed T2350: Interface geneve conf-mode error, a subtask of T2353: Interface [conf_mode] errors, as Resolved.
Apr 26 2020, 8:51 PM · VyOS 1.3 Equuleus
thomas-mangin closed T2350: Interface geneve conf-mode error as Resolved.
Apr 26 2020, 8:51 PM · VyOS 1.3 Equuleus
thomas-mangin added a comment to T2363: Use pyroute2 instead of calling 'ip'.

I agree but it will be quite some work ... I would happy to work on this as it would remove my of my issues with calling "cmd()" for network interface setting.

Apr 26 2020, 8:39 PM
thomas-mangin awarded T2363: Use pyroute2 instead of calling 'ip' a Like token.
Apr 26 2020, 8:35 PM

Apr 25 2020

thomas-mangin added a comment to T2241: Changing settings on an interface causes it to fall out of bridge.

@jjakob if you enable debugging and record what is happening to the interface when it drops would be useful.

Apr 25 2020, 2:11 PM · VyOS 1.3 Equuleus
thomas-mangin added a comment to T2241: Changing settings on an interface causes it to fall out of bridge.

For clarity, I do not believe the rewrite in the parent task is the root of the issue, as the behaviour on configuration was not changed. The code was restructured but the action logic remained the same. The same commands/actions will be run now as were run before the patchset. If something changed it will be in the conf mode interface code and not ifconfig AFAICS

Apr 25 2020, 10:12 AM · VyOS 1.3 Equuleus
thomas-mangin added a comment to T2241: Changing settings on an interface causes it to fall out of bridge.

Yes the code always does down / up. It is something @cpo and I discussed and it was deemed safer when performing changes. There could be a way to indicate that a change occur which should cause a trigger in another section. Something all sections should run on every change. This would be a major design change as we would not anymore apply everything, would need to decide what part of the change trigger this update process and implement a new section and make sure it is run !

Apr 25 2020, 10:09 AM · VyOS 1.3 Equuleus

Apr 24 2020

thomas-mangin added a comment to T2226: unify all the ways commands are run.

@jjakob this is the wrong phabricator entry to discuss it but I got your point ;-)

Apr 24 2020, 2:19 PM · VyOS 1.3 Equuleus
thomas-mangin added a comment to T2360: Document the common logging library airbag.py.

This is correct.

Apr 24 2020, 2:10 PM · VyOS 1.3 Equuleus
thomas-mangin added a comment to T2377: logging across boot.

@jjakob https://github.com/vyos/vyos-1x/pull/376

Apr 24 2020, 1:46 PM · VyOS 1.3 Equuleus
thomas-mangin created T2377: logging across boot.
Apr 24 2020, 9:43 AM · VyOS 1.3 Equuleus
thomas-mangin added a comment to T2226: unify all the ways commands are run.

The file should have been 660 and it should have worked .. I will check

Apr 24 2020, 7:00 AM · VyOS 1.3 Equuleus