Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[resolved] syslog-ng-update-virtualenv: what if I ran it?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
mbrehon
n00b
n00b


Joined: 10 Jun 2006
Posts: 50
Location: Colorful Colorado

PostPosted: Thu Jan 11, 2024 7:41 pm    Post subject: [resolved] syslog-ng-update-virtualenv: what if I ran it? Reply with quote

[Edit 2024jan20 to add:] this problem is seemingly unique to syslog-ng-4.2.0 with the python use flag set.

Saw a boot message on a rarely rebooted machine from syslog-ng that said something like you need to run syslog-ng-update-virtualenv. So I did. It ran a few pip installs which I believe is a no-no. From other gentoo docs it is stated that running pip as root can bork your system.

1) Can I tell if my system is now borked?

2) Can I undo it?

thanks,
-Mark

[Edit 2024jan20]: running syslog-ng-update-virtualenv seems to have just added a new dir /var/lib/syslog-ng/python-venv, under which are apparently some python lib installations specific to syslog-ng-4.2.0, untracked by portage, which could cause python lib version issues. Next version of syslog-ng (4.3.1) allegedly fixes this, so I upgraded and removed the python-venv directory. Boots ok (no syslog-ng warning), see how it runs next few days.
Back to top
View user's profile Send private message
NicoT
n00b
n00b


Joined: 21 Oct 2006
Posts: 9
Location: Netherlands

PostPosted: Tue Sep 10, 2024 1:43 pm    Post subject: Reply with quote

I also noticed this message during boot:
Code:

* Checking your configfile (/etc/syslog-ng/syslog-ng.conf) ...
python: the current set of requirements installed in our virtualenv seems to be out of date, use the `syslog-ng-update-virtualenv' script to upgrade Python dependencies; path='/var/lib/syslog-ng/python-venv'
 [ ok ]
 * Starting syslog-ng ...
[2024-09-10T13:58:01.889889] python: the current set of requirements installed in our virtualenv seems to be out of date, use the `syslog-ng-update-virtualenv' script to upgrade Python dependencies; path='/var/lib/syslog-ng/python-venv'
 [ ok ]


Looking in my emerge log, I can see I started with version 4.2.0 (I think it is from the live iso during installation) on DEC 25 2023, then downgraded to 4.0.1 on FEB 6 2024, and then upgraded to 4.6.0 on FEB 8 2024.
So I skipped version 4.3.1.

Is there anything I have to do, or how can I get rid of this message?

Code:
Installed versions:  4.6.0^t(03:31:24 PM 09/10/2024)(python -amqp -caps -dbi -geoip2 -grpc -http -json -kafka -mongodb -pacct -redis -smtp -snmp -spoof-source -systemd -tcpd -test PYTHON_SINGLE_TARGET="python3_12 -python3_10 -python3_11")
Back to top
View user's profile Send private message
mbrehon
n00b
n00b


Joined: 10 Jun 2006
Posts: 50
Location: Colorful Colorado

PostPosted: Tue Sep 10, 2024 5:04 pm    Post subject: Reply with quote

Gentoo Python experts, please chime in here if I'm terribly wrong!

what I believe happened to me:
- LARGE CAVEAT: I am NOT a python expert and do not really understand python virtual environments.
- updating from 4.1.? to 4.2.0 created a new virtualenv directory unique to that version of syslog-ng at /var/lib/syslog-ng/python-venv that contains specific versions of python libraries required by syslog-ng-4.2.0 .
- I believe this was a QA oversight either by the upstream packagers or by the gentoo devs (no complaints, thank you volunteers!).
- so after installing syslog-ng-4.2.0 there were two copies of relevant python libraries, 1) the system set, and 2) the syslog-ng-4.2.0 set
- while the versions of those python libraries matched, there was no complaint upon launch of syslog-ng.
- time goes on pkgs get updated, portage knows nothing about those /var/lib/syslog-ng/python-venv libs so they do not get updated thru an 'emerge --update'.
- when there is finally a mismatch between those syslog-4.2.0 specific python libs and the system libs the syslog-ng boot script detects it and displays that boot message.
- so now, even though you've updated to syslog-ng-4.6, that directory (/var/lib/syslog-ng/python-venv) still exists with stale python libs in it causing the boot script warnings.

what I tried to remedy it:
- After updating beyond syslog-ng-4.2.0, I moved that virtualenv directory out of the way so the syslog-ng init script would not find those stale python libs:
[[[ WARNING: POSSIBLY DANGEROUS, but it did work for me ]]]
# mv /var/lib/syslog-ng/python-venv ~/.

result:
- seems to have worked - system now boots with no warning messages for syslog-ng launch and I have not seen any other problems since doing this.
- oh and that dir, /var/lib/syslog-ng/python-venv, has not reappeared thru successive syslog-ng updates.


Hope that helps!
Back to top
View user's profile Send private message
NicoT
n00b
n00b


Joined: 21 Oct 2006
Posts: 9
Location: Netherlands

PostPosted: Wed Sep 11, 2024 5:02 pm    Post subject: Reply with quote

Thanks for your extensive answer. It seems to work for me too.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum