/srv/irclogs.ubuntu.com/2022/04/01/#ubuntu-server.txt

=== vlm_ is now known as vlm
betuxyHey guys, I need a solution to realtime sync a log directory (so a lot of changes may occur) to a second server. lsyncd and mirror both explicitly say they're only suited for a slowly changing directory tree because the use of rsync.05:06
mirespacegood morning05:17
cpaelzerhi mirespace05:18
cpaelzerand good morning everyone05:18
utkarsh2102mirespace: o/05:18
utkarsh2102cpaelzer: o/05:18
cpaelzerbetuxy: IMHO this depends on what architecture you want/need - you could either go with central storage and remote access to it (like NFS) or to an FS that keeps itself synchronized (like glusterfs)05:23
mirespaceo/05:23
betuxycpaelzer: mh nfs share might work ill look into it05:29
yurtesenI made a very trivial debdiff for bug #1964881 and having trouble finding a sponsor. Does anybody have suggestion on how to solve this dilemma?05:32
ubottuBug 1964881 in tomcat9 (Ubuntu) "Logging/Log rotation does not work for catalina.out" [Undecided, New] https://launchpad.net/bugs/196488105:32
betuxyI have trouble exporting an nfs folder, my /etc/exports says "/var/log/user/test/application_logs 10.1.4.20(rw,sync,all_squash,anonuid=0,anongid=1000)"   however when i sync data on my client as root user the files have root:1030 as uid/gid  according to the ma n page all user/group should get squashed and set accordingly no?08:16
ahasenackmorning12:13
* kanashiro waves12:14
athosgood morning!12:45
athossergiodj: nice! Any luck on closing the tracks? 12:46
trippehubuntu isos doesnt appear to support netbooting isos directly using uefi httpclient. it works with Fedora.13:03
trippehprobably doesnt know what to do with the efi pmem block device the iso gets exposed over13:05
trippehit does manage to load the initrd though, which has a fallback to downloading the iso itself13:06
sergiodjathos: yeah, I could close the channels without problems.  I initially closed just the 21.04 (for testing), but now I will close the rest14:28
blackboxswrenanrodrigo: Let's continue our original discussion from standup about the situation where python3's apt.Cache representing certain packages like 'cloud-init' 'python3' etc as not having an origin in 'main' when we query <apt.package.Package>.installed.origins we only see something like [<Origin component:'now' archive:'now' origin:'' label:'' site:'' isTrusted:False>]15:11
renanrodrigoexactly. just to make clear, packages don't have origins in APT - they have versions, and versions have origins15:12
renanrodrigothe version that comes installed in the image does not have any origin except from `now`15:12
blackboxswrenanrodrigo: I think the scenario where this happens is when a dated cloudimage is launched, we run apt update, but there has been a newer version of that package released. So apt doesn't see that currently installed version as "present" in the newly updated apt cache.15:12
blackboxswrenanrodrigo: apt policy cloud-init will agree in that case too and represent the  fallback information from dpkg with something like 15:13
blackboxsw *** 18.01-0ubuntu3.5 10015:13
blackboxsw        100 /var/lib/dpkg/status15:13
renanrodrigothis leads to a question. When package version `X` is released, does package version `X-1` get wiped out from the archives?15:14
blackboxswI can see this behavior launching bionic images, yet with the packages: ['landscape-common', 'libpython3.6', 'libpython3.6-minimal', 'libpython3.6-stdlib', 'python3-twisted', 'python3-twisted-bin', 'python3.6', 'python3.6-minimal', 'rsync']15:14
blackboxswI happen to know that landscape-common just went through an SRU recently... so there is drift in what the archive represents vs what cloudimage was built with.15:15
renanrodrigofurthermore, can I assume that those packages that don't have archive references anymore will always have the reference to a newer version?15:17
blackboxswrenanrodrigo: note as well I can confirm that lxc launch ubuntu-daily:bionic if I hit apt.Cache() before running apt update. You will properly see all packages with correct origins.15:18
blackboxswso this drift will always happen on systems that run apt update daily, but to not auto-upgrade packages15:18
blackboxsw*do not allow unattended upgrades*15:19
MrMobiusim running ubuntu server with no GUI on a low powered netbook. any recommendation for advising me when the battery is low? i know how to check it from the console but cant think of a good way to have it warn me when it's almost dead15:19
blackboxswrenanrodrigo: "can I assume that those packages that don't have archive references anymore will always have the reference to a newer version?" I don't think always. it's possible someone removed an apt source between updates. So they'd also fall into this camp where no additional newer versions would be visible15:20
renanrodrigothis makes a tricky situation out of it. If you installed  a package from the archive, and then removed the source, the package holds no information of where it was installed from15:22
sdezielMrMobius: I'd try to put that in a cron: read -r capacity < /sys/class/power_supply/BAT0/capacity && [ "$capacity" -lt 20 ] && echo "low battery"15:22
blackboxswrenanrodrigo: but at that point, those packages would be considered custom local installed debs and so you aren't going to have the ability to upgrade anyway and they wouldn't be in your "list of available updates"15:22
MrMobiussdeziel, right though you now have random text spurted out somewhere that hopefully you see if youre in a TUI like gdb. i know that will work but was hoping for something less janky15:23
renanrodrigoblackboxsw: I mean, 'list of available updates' is fine, but how about 'list of installed packages'?15:24
renanrodrigoif a package is installed from `universe`, and then the source is removed, I have no way to tell it, but this still makes it that you have a `universe` package in your system15:24
sdezielMrMobius: actually, this one will produce less noise: read -r capacity < /sys/class/power_supply/BAT0/capacity && [ "$capacity" -gt 20 ] || echo "low battery"15:24
sdezielMrMobius: cron's output is emailed normally15:24
sdezielMrMobius: that's the quick and dirty way, you are free to replace the echo with something fancy like a webhook or whatever ;)15:25
blackboxswrenanrodrigo: yes, but APT won't know that anymore for sure because it doesn't have a cache of information anymore to look it up. This is an acceptable scenario for the tooling I would think. If you don't have configuration that tells you where a pkg came from, we can't expect local tooling to report that metadata.15:25
MrMobiussdeziel, thanks for your help. what im asking basically is what fancy alternatives there are to just printing text at a random place on the screen since you have no control where it ends up if youre in a curses program or something. if cron emails me, can i notify myself some other way?15:26
blackboxswrenanrodrigo: otherwise `ua security-status` would have to make remote GETs to any expected default APT pockets/components/repos in order to discern if a package version maybe came from said repo/pocket/suite15:28
MrMobiusmaybe detach myself from tmux before printing the battery warning and just always stay in tmux15:28
sdezielMrMobius: I don't understand whey tmux comes in. cron's could run the above script in its own environment, not inside your tmux15:29
sdeziels/whey/where/15:29
renanrodrigoblackboxsw: I hope we are not doing it :D15:30
renanrodrigoblackboxsw: so I can assume that a) if I know it from the installed version, we good; b) if i don't, I can go for candidates to know; c) If no candidates, I assume it's third party15:31
MrMobiussdeziel, what i mean is if im in tmux (or out of tmux for that matter) using gdb or vim and that cron fires, the battery warning could end up anywhere on the screen. if i have the cron job detach me from tmux (not sure if thats possible) then the battery warning will be very noticeable because im suddenly out of vim and at a command prompt15:31
rbasakMrMobius: you can arrange for tmux to give you a status line with stuff like battery level. Try "byobu" (as a tmux wrapper) for an example.15:33
MrMobiusrbasak, thanks15:40
blackboxswrenanrodrigo: maybe other folks know if there is vestigial APT/dpkg configuration left on the system after the removal of an apt source and whether you can determine what component if was installed from.  But basically that metadata comes from the Packages file for a given APT repo stored in something /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_bionic-updates_main_binary-amd64_Packages.15:41
blackboxswrenanrodrigo: one that apt source metadata changes (typical in Ubuntu Packages files to only represent the latest released version) or disappears (due to removal of apt source directive). Then we locally no longer know via apt policy/cache otherwise where debs came from I don't think. Anyone please correct this if I am mistaken.15:43
rbasakblackboxsw: I'm not sure if I follow your issue exactly, but I'm fairly sure that apt keeps no record of where a package came from. Once it's installed, apt only knows it's installed because dpkg says it is.15:44
rbasakApart from logs, and there's the apt-mark thing but I don't think that's relevant to this.15:45
renanrodrigorbasak: thanks for clarifying15:45
renanrodrigoblackboxsw: another tricky situation now - package version `x` is in the archive (in `main`, for instance), but installed version is `x~y.z~ppa234`. How do we list it? Is it main? Is it third party?15:51
blackboxswrbasak: thanks, you understand enough of the context. It's trying to accurately represent packages installed on a system and what APT components they originated from via `ua security-status` which talks to python's apt.Cache(). If there is no APT metadata left to /var/lib/apt/lists/*_(Packages|InRelease) tell apt tooling where the package originated, local tools are out of luck.15:55
blackboxswrenanrodrigo: I'd vote third-party. no telling what patches could have been applied15:56
jrwrenso apt doesn't let you say install at least this version... which would be nice in a dockerfile if you know previous versions have a security vulnerability15:56
jrwrendoes dpkg have a way to assert that a version is newer?15:56
jrwrendpkg --validate-version maybe? but I'm not sure how to use it.15:56
rbasakblackboxsw: I think the best you can do is match against the installed package version. In theory there should always be a unique version for a unique origin. But in practice third parties break that all the time, and there's little coordination even within "official" sources like ESM.16:01
blackboxswjrwren: I'm not quite sure what you are looking for, but if you know the fixed_version "1.2"  and the current_version installed "1.1" you can compare with something like `dpkg --compare-versions  1.1 gt 1.2 && echo "SECURE" || echo "INSECURE"`16:01
blackboxswrbasak: +116:02
rbasakjrwren: maybe you want "apt satisfy"?16:02
renanrodrigorbasak: the problem with this approach is those packages that have stale versions installed, which are not third-parties but rather versions previously in the archives, but now don't have a pointer there anymore.16:03
renanrodrigoWhat would we consider those?16:03
rbasakrenanrodrigo: if I follow, then I think what I'm saying is that you need external data to see all the package versions historically published and their origins. Then you could look up everything installed locally to infer (as best as is possible heuristically like that) their origin16:04
rbasakrenanrodrigo: however it's not possible to do that from apt sources or information only available locally16:05
renanrodrigorbasak: ack16:05
blackboxswrbasak: apt satisfy, nice reference. TIL as I hadn't been aware of it.16:05
rbasakI think it's relatively new16:09
jrwrenI think apt satisy is what i want. TY.16:09
jrwrenhrm, but it isn't in 18.04 :(16:11
rbasakI think sbuild uses "equivs" (and "equivs-build", etc) to hack an equivalent16:13
rbasakInstall an equivs package with the versioned dependency relationships you want, and then that'll result in failure, and then ask apt to fix the situation.16:13
jrwrendpkg --compare-versions $(dpkg -s openssl |awk -F': ' '/^Version/{print $2}') ge 1.1.1-1ubuntu2.1~18.04.15 does exactly what I want. Thank you all.16:15
blackboxswgood to hear jrwren : You might be able to replace your dpkg -s...  with "$(dpkg-query -Wf='${Version}' openssl)"16:43
blackboxswbut "6 in one hand half-dozen in the other" or whatever the saying is16:44
rbasakjrwren: it might be worth noting that there probably exist packages with higher versions that are vulnerable - for example if a subsequent release came out before the security update in a previous release did. But it's probably good enough for you to have what you do.16:50
MrMobiusI can't get this netbook to recognize alt+up or ctrl+up. both of them show ^[[A the same as up in cat. ctrl+letter does work. any idea what's going on?17:14
sergiodjathos: I closed the 21.04 and 21.10 channels of our snaps18:15
sergiodjI will wait until Jammy is released to close the 20.04 channels, just in case18:15
athossergiodj: thanks! :)18:28
sergiodjathos: thanks for bringing this up!18:28
brycehheh, the update-excuses page is long enough to occasionally cause a firefox tab crash18:35
ahasenackbryceh: do you know if we have some 22.04-only server guide changes? A pattern?19:58
ahasenackwe decided to use just one guide for all versions, right, and highlight there something was 22.04 specific19:58
brycehahasenack, correct19:58
brycehafaik we did not identify a standardized style for calling these out19:59
brycehso if you come up with a good approach post about it to the ML19:59
ahasenackk19:59
kanashiroin case someone has some time before EOW, I'd like an ack on this debdiff before uploading it: https://bugs.launchpad.net/ubuntu/+source/golang-1.16/+bug/196742521:25
ubottuLaunchpad bug 1967425 in golang-1.16 (Ubuntu Bionic) "Backport golang 1.16 to Bionic" [Undecided, New]21:25
brycehkanashiro, heya I can take a look21:29
brycehkanashiro, would you prefer comments here, on the bug, or pm, or ?21:29
kanashirobryceh, I think on the bug is fine21:30
brycehokie21:30
kanashiroI am EOWing now, I'll take a look at your comments on Monday :)21:30
brycehkanashiro, have a good weekend21:30
kanashirobryceh, same for you21:31
* kanashiro -> EOW21:31

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!