[00:41] hi all. i have a strange problem with ubuntu server. when i try to compile a programm i get this error here => "error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory" libtinfo however exist on my system and is located at /usr/lib/x86_64-linux-gnu/libtinfo.so What is wrong and how can i fix this Problem ? [00:49] do you have a so.5 symlink to libtinfo ? [00:51] linuxperia: ^ [00:52] mybalzitch: thank you very much for your helpfull tip. i just looked it up and this is how it looks like on my side => it points to version 6 instead 5 => /usr/lib/x86_64-linux-gnu/libtinfo.so -> /lib/x86_64-linux-gnu/libtinfo.so.6 [00:52] yes, create another symlink pointing libtinfo.so.5 to libtinfo.so.6 [00:53] so i need change then the version in the code to use 6 instead 5 and then everything should be perfect. ahh okey this will work also. thank you very much will do it and report back [00:53] or recompile, yeah [00:56] Yes got one step further. now it complains that /lib/x86_64-linux-gnu/libtinfo.so.5: version `NCURSES_TINFO_5.0.19991023' not found looks like need older ncurses hmmm [00:58] mybalzitch: thank you very much for your helpfull tip with the symlink. you helped me recognize the problem! [00:58] no problem! hope you get it sorted === mIk3_09 is now known as mIk3_08 === mIk3_09 is now known as mIk3_08 === im0nde_ is now known as im0nde [10:49] how can i bind sshd to an address that works through reboots? If i bind to address and manually restart daemon it works but it doesnt manage to bind to address upon booting,journalctl shows failed: "Cannot assign requested address fatal: Cannot bind to any address" [11:03] this sounds like the ip address you're having sshd listen on isn't bound to an interface by the time sshd is starting. [11:04] you could either bind sshd to a different systemd target which ensures that the ip address has been bound to the interface, or make sshd listen on ANY and set up firewall restrictions to limit where inbound copnnections will be accepted from / to [11:05] vlm: ^ [11:28] tomreyn: ill try those options thanks [12:39] vlm: if you're using netplan with networkd or networkd on its own, then "systemctl list-units" will show you the After= target to use. For example mine is sys-subsystem-net-devices-enp0s31f6.device. [13:17] rbasak: nice tip ill give it ago aswell! [13:37] seems had it right first time only i had a spelling error, network.online.target instead of network(-)online.target,would it be any advantages with your approach rbasak? [13:42] vlm: network-online.target is vague if you have multiple NICs. [13:42] Or hotplug any NICs. [13:42] vlm: see https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/ [13:44] So if you're binding to an address on a specific device and need to start a service only when that address is ready, the best thing is to start the service only when that specific device is up. [13:44] But as tomreyn said, better to avoid that situation altogether. [13:44] Why do you need to bind ssh to a specific address anyway? [14:21] I was reading the link earlier on but missed that,seems its not so dependable,it works on a test system but on the server i need it doesnt,i just want to restrict traffic,i knew i could do it in firewall but got curious to how come sshd wouldnt [14:21] bind on reboot so started researching [14:27] Ideally sshd would adapt dyamically as the systemd documentation page describes [14:27] Failing that, I'm not sure I would trust the firewall configuration on its own [14:28] Maybe use Match, DenyUsers and AllowUsers directives in sshd_config and test that independently to ensure it's working as expected. [14:28] And then add a firewall configuration on top of that [15:43] rbasak: seems like a good idea indeed,more layers of security is nice so if the one fails we got backup,started poke around pam access.conf and host.deny aswell [15:50] vlm: I would pick two only. More complexity means more likelyhood of a mistake :) [15:54] vlm: to build on rbasak's suggestion, "Match LocalAddress" would probably be useful to you [16:21] rbasak: it could get too much also, usually i document stuff i do when it get complexed so common faults that may occur in such situations i can easily resolve,have helped me alot when things go wrong [16:21] sdeziel: yes that was what i was thinking aswell thanks for chime in [16:21] sdeziel: or i was thinking might be an option to Match ThisIp or so ,its nice to have options atleast to secure in many ways is my thought [19:36] bryce: around? [19:36] bryce: I implemented the mk_commit refactoring you requested [19:37] But I ended up doing it as a constructor method (a classmethod) in repo_builder.Commit. [19:37] Question: do you want a test for that? It's entirely within the test infrastructure so not used in production, and it's being fully exercised by the tests. [19:38] Here's the implementaton: https://git.launchpad.net/~racb/usd-importer/diff/gitubuntu/repo_builder.py?h=importer-add-tests&id=a0f087ec7539a909ee01bdb68820693fc3012122 [19:38] (the branch is still a work in progress) [19:39] In general I'm not sure what our policy needs to be for testing the test helpers [20:31] Hello. I am looking to find the difference between Ubuntu cloud images (from https://cloud-images.ubuntu.com/bionic/20191127/ ) with .img and .vmdk extensions. When I use the .vmdk under VMware vCloud Director, it boots, but converting the .img to .vmdk causes it to hang. I have other .imq and .qcow2 images that I want to convert and they all exhibit the same behaviour. [20:32] Hello, I have a question regarding netplan in ubuntu 20.04. For a server with 3 interfaces with each their own gateway, how does networkd determines the default gateway? It seems like ip route get always returns the right interface, I'm trying to understand how it chooses the correct interface as its default gateway. I haven't defined any route in the netplan config. [20:39] rbasak, yep just back from lunch [20:39] hmm good question on testing test helpers [20:40] in other projects I've not tended to worry about testing test helpers, since the testsuite itself exercises the code adequately most of the time [20:41] but for more complex helpers, or if it helps in doing the development, I suppose no reason not to allow them [20:45] rbasak, that said, since this code would live in the main code rather than purely in a *_test.py file, a test case would probably be appropriate [20:45] OK, thanks. I'll add some tests for it. [20:47] ...on Monday. Enjoy your weekend :) [20:48] I imagine monkeypatch could be an alternate way to do it. No idea how easy/hard that'd be though. [20:48] rbasak, right, cya monday! [20:49] btw I (might) have jury duty next week [20:50] OK [21:47] Hi, my name is Eric Lafontaine and I was told that some people over here could help me understand a behaviour with the networking/kernel [21:53] I'm having a server with 3 NIC using DHCP and all having gateways. The behaviour I'm seeing is that the kernel is able to know that the last interface should always be the default gateway interface, whatever bouncing of the interface I do. This seems like magic to me and I'm trying to understand how come. all 3 default routes are present, but it's always the last interface that is used by [21:53] the kernel as the route to internet. [21:54] (I have this behaviour with the base image of Ubuntu 20.04 ) [21:54] (on an openstack environment) === ysch_ is now known as ysch [22:04] ericlafontaine: hi ! I think rbasak will be able to help you out. Maybe he's EOD though, might have to wait for Monday [22:07] ericlafontaine: why would u have 3 gateways ?! [22:07] Hi @crodriguez, thanks. If anyone else want more details/are curious, please contact me directly :) [22:08] I'm putting a router in place to abstract network complexity. [22:08] ok but what is the purpose of having 3 gateways ? [22:08] you want to load balance traffic among all 3 ? [22:11] It's my first time using an IRC, so I'm not sure if I should try to summarize or go all out on explanations... [22:12] just answer the question [22:12] its easier =) [22:12] ericlafontaine: you have 3 net providers and want to load balance among them ? is that it ? [22:12] or something like it ? [22:14] basically, I have an intranet for which my "router" will be acting as the gateway (ubuntu server) for other servers on the intranet. The second network is another intranet for which some routes are provided (this one doesn't actually have a gateway, but dhcp put's one in anyway... bug? maybe, didn't get time). The third interface is the real external network and should stick to being my de [22:14] fault gateway whatever happens. [22:15] I get the behaviour I want, but I can't explain how it works, which is troubling me. [22:15] ericlafontaine: dhclient can drop gateway [22:15] for example [22:16] its not because dhcp server gives you HAVE to use =) [22:16] check /etc/dhcp/dhclient.conf [22:16] you can configure an interface not to "request" routers, for example, but request everything else [22:16] you can request only IP, or IP and NTP, IP and DNS, etc [22:16] I found that it's using the systemd-networkd and whatever bouncing of interface I do, my last interface stays the default interface. I would have expected this to be like dhclient behavior you're describing, but it wasn't dhclient [22:17] ah gotcha [22:17] so you're using netplan [22:17] yes [22:17] with systemd-networkd backend [22:17] default 20.04 ubuntu server [22:17] ok lets check how to drop dhcp options in systemd [22:17] 20.04 ? (focal ?) [22:17] its -devel [22:17] I know :) [22:17] still it does what I need it to do [22:17] ok [22:17] which is why I was looking at it [22:18] my problem is that I don't understand how it can keep the last interface whatever "bouncing" I do... [22:19] It's an happily nice behaviour :) I just can't explain it [22:19] looks like [22:19] https://github.com/systemd/systemd/issues/5134 [22:19] the feature you're looking for was in this issue [22:22] http://man7.org/linux/man-pages/man5/systemd.network.5.html [22:22] check [DHCP] section [22:22] UseRoutes= [22:22] When true (the default), the static routes will be requested from [22:22] the DHCP server and added to the routing table with a metric of [22:22] 1024, and a scope of "global", "link" or "host", depending on the [22:22] route's destination and gateway. If the destination is on the [22:22] local host, e.g., 127.x.x.x, or the same as the link's own [22:22] address, the scope will be set to "host". Otherwise if the [22:22] gateway is null (a direct route), a "link" scope will be used. [22:22] For anything else, scope defaults to "global". [22:22] you can change the generated systemd file [22:22] and UseRouters=false [22:22] UseRoutes=false [22:22] for the interfaces you don't want a gateway set [22:23] (for example) [22:23] my network configuration only had [DHCP] active, nothing else [22:23] let me check if netplan supports it [22:23] https://netplan.io/examples [22:23] it shows an option [22:23] "dhcp4-overrides [22:23] Connecting multiple interfaces with DHCP [22:24] check this there ^ [22:24] suggestion they give is to raise the route metric [22:24] so the default router is used by your main interface [22:24] and the other gateways are "ignored" [22:24] because they have a big metric [22:24] did you check that ? have you tried ? [22:25] yes, all my interfaces turned out to have the same metric... [22:25] even using the override ? [22:25] I haven't tried any change, I just tried to understand how the kernel knew... [22:25] can i send you the routes and netpan? [22:26] I have those with me. [22:26] ericlafontaine: if you put 3 gateways with same weight [22:26] or metric in this case [22:26] kernel will round robin among them [22:26] so you will use tcp retransmissions [22:26] that's what I would've had expected [22:26] ah thats the default behaviour [22:26] and its designed that way [22:26] because you are using the same routing table [22:26] (without knowing) [22:26] kernel has multiple routing tables you could use [22:26] yeah, I would have expected that, but it didn't do that [22:27] it didnt ? [22:27] which is why I don't understan [22:27] what did it do ? [22:27] it stuck with the "highest" interface in the order "ens5" > "ens4" > "ens3" [22:28] I've been starting to read about the kernel internal structure to understand [22:28] fib_tree, etc. [22:28] so trying to see what am I missing [22:29] so it always used the latest default router [22:29] I was expecting to be kicked out of the server when I restarted "ens4" but that didn't happen [22:29] routes are cached for existing connections [22:29] ip route show cache is always empty [22:30] maybe I didn't bound the interface the right way? [22:30] well you didnt assign them weights [22:30] "ip link set down dev ens4" ? [22:30] so im not sure the correct behavior nowadays [22:30] I didn't and cloud-init gave them 100 I believe by default [22:30] the old behavior was: [22:30] https://www.tldp.org/HOWTO/Adv-Routing-HOWTO/lartc.rpdb.multiple-links.html [22:31] ahhhhhhh actually [22:31] the old behavior without weights [22:31] was not to load balance at all [22:31] was to use latest default gateway [22:31] #) [22:31] ? [22:31] so if you're using the same routing table [22:31] which likely you are [22:31] (by the way, I really appreciate :) I spent 1-2 days on this, and curiosity was killing me ) [22:31] and you add 3 routes to 0.0.0.0 [22:31] only the last one will work [22:31] that is what happened to you right ? [22:32] BUT if you have different routing tables [22:32] then you can assign them weights [22:32] and load balance among them [22:32] but you have to have different routing tables [22:32] not the same one [22:32] because the rules have hierarchy [22:32] if you satisfied the route, you dont need another [22:32] it's rules over route tables, right? [22:32] yep [22:33] 30 sec [22:33] I'll go on the server [22:33] sure [22:33] I might lose my connectivity... [22:33] #( [22:39] Alright, I'm back [22:40] ok [22:40] so I can send you the all the routing I have on the server [22:40] so.. 1st things 1st [22:40] you're using netplan to configure its nics [22:40] correct ? [22:40] yes [22:40] can I see your /etc/netplan/* files ? [22:40] in order for that [22:41] you can pastebin them [22:41] its easer =) [22:41] here? [22:41] paste.ubuntu.com [22:41] paste there and get me a likn [22:42] https://paste.ubuntu.com/p/mw9fGR3QtK/ [22:42] I'll get you the routing table as well [22:43] alright [22:43] https://paste.ubuntu.com/p/Z5t9qhzn4V/ [22:43] routing ^ [22:46] default via 198.18.200.1 dev ens5 proto dhcp metric 100 [22:46] default via 192.168.128.1 dev ens4 proto dhcp metric 100 [22:46] default via 192.168.129.1 dev ens3 proto dhcp metric 100 [22:47] so they're all in the same routing table [22:47] with the same metric [22:47] only the latest interface (to get dhcp) [22:47] yup [22:47] will have an operatinal gateway [22:47] you should drop the gateways you dont need [22:48] The behaviour I have is the ens5 can be the only interface not bounced and it still would be the default gateway used. [22:48] what do you mean by bounced ? [22:49] "ip link set down ens3" [22:49] "ip link set up ens3" [22:49] ah gotcha [22:49] so a reset [22:49] if you reset a nic then you lose the default gw [22:49] and then you lose conectivity [22:49] because the other one becomes operational [22:50] is that it ? [22:50] nope, I'm not losing my connectivity... [22:50] lose conectivity meaning nic down / nic up again [22:50] ens5 stays my default gateway in the server [22:50] because its your last added gateway [22:50] which is the behaviour I wanted but I don't get how it works [22:51] what do you mean by "last added"? [22:51] if you do this: [22:51] route add default gw 1.1.1.1 [22:51] route add default gw 2.2.2.1 [22:51] route add default gw 3.3.3.1 [22:51] all 3 have the same metric [22:51] kernel will only reach 2.2.2.1 if 3.3.3.1 can't be reached [22:51] no ? [22:53] well that wasn't what I would have expected since I removed the dhcp interface, no? [22:53] so I would have expected the route to be re-applied when I was bringing the interface up again [22:53] ooooooooooo [22:53] no you did not remove the ip [22:53] its a real nic [22:54] if it was a virtual nic.. you would have dropped the nick [22:54] like veth0 for example [22:54] but for a real one [22:54] IP stays there if you up/down [22:54] have u shutdown the networkd for that nic ? [22:55] nope, I didn't find individual interface services [22:55] 26 systemctl status sys-subsystem-net-devices-ens3.device [22:55] 27 systemctl restart sys-subsystem-net-devices-ens3.device [22:55] I did try this though; [22:55] but it was denied as an operation [22:56] are you root ? [22:56] =) [22:56] yup [22:56] this is the device itself [22:56] its a .device unit file [22:56] so it wont restart [22:56] its internal to systemd [22:56] so what would the service be named? I only found the "systemd-networkd" service which seemed to manage all interfaces [22:58] (did I say that I really appreciate? I really do :) I've been struggling to understand ) [22:59] let me get one example here [22:59] damn, all my machines are using ifupdown currently [22:59] :o) [22:59] XD [23:00] im unsure you can control the interfaces like a systemd unit [23:00] I'll setup my other non-work computer to be able to continue discussing here while having the server connected to tryout stuff [23:00] i think you would change your .network files [23:00] and restart networkd [23:00] and it would reconfig as you want [23:01] networkctl shows the configured nics [23:01] I didn't find the .network file in /etc/systemd/network [23:01] thats the netplan secret [23:01] I'll try the networkctl [23:01] if you had create the .network files on your own [23:01] ha ha !, thanks [23:01] you could put into /etc/systemd/network [23:01] for example [23:01] yours is probably at [23:01] /var/run/systemd/network [23:02] give it a try [23:02] cd /var/run/systemd [23:02] find . | grep -i network [23:03] i gotta go now (dinner time here) [23:03] ericlafo_: rafaeldtinoco@ubuntu.com [23:03] drop me an email if you have any other questios [23:03] ill try to address if I can [23:04] or hang around here [23:04] we're always over here =) [23:04] alright, thanks :) I'll look through what you provided an email you the conclusions :) [23:04] thanks a lot! [23:04] sure. good luck [23:04] my pleasure. take care o/ [23:04] o/