-
Notifications
You must be signed in to change notification settings - Fork 372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] 'DebianOSBaseUtil' is not defined Kali Linux 2020.2 #1904
Comments
This one is odd, as |
Are you using the version in the Kali apt repository? I am seeing the same problem and it looks to be an issue with the Kali package. It is probably an old version of WALinux. |
@jaark - right. It is issue with kali package. The official fix from offsec will take time i believe. But I was able to quickly fix it by manually importing the package DebianOSBaseUtil in common/osutil/factory.py. |
The removal of the import line might have been a change made by the kali package maintainers; our code for v2.2.47 does in fact have the necessary import. Additionally, we never actually went through with a release for 2.2.47, so I'm not quite sure what's going on there. Regardless, I think the work around of manually importing the package as @manishrana2016 mentioned is the best mitigation we can do until the kali package is updated. I'm going to mark this issue as closed in the meantime. |
@manishrana2016 could you explain (in as much detail as possible) how you resolved the issue, like you're talking to a five year old (me?). Thanks. |
@manishrana2016 how did you go about importing it manually? Facing the same issue |
@richjjoh and @Javy26 |
Thank you! @manishrana2016 Really appreciate you taking the time. |
Much appreciated @manishrana2016 |
Thanks for the hint @manishrana2016 |
For reference: https://salsa.debian.org/waldi/waagent/-/merge_requests/3 |
Describe the bug: A clear and concise description of what the bug is.
After Azure Marketplace install of Kali Linux. apt-get dist-upgrade or only upgrade of waagent receive the following stack trace when running waagent (-deprovision, -version, etc.):
Traceback (most recent call last):
File "/usr/sbin/waagent", line 11, in
load_entry_point('WALinuxAgent==2.2.47', 'console_scripts', 'waagent')()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 490, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2859, in load_entry_point
return ep.load()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2450, in load
return self.resolve()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2456, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/usr/lib/python3/dist-packages/azurelinuxagent/agent.py", line 34, in
import azurelinuxagent.common.event as event
File "/usr/lib/python3/dist-packages/azurelinuxagent/common/event.py", line 632, in
event_logger = EventLogger()
File "/usr/lib/python3/dist-packages/azurelinuxagent/common/event.py", line 304, in init
osutil = get_osutil()
File "/usr/lib/python3/dist-packages/azurelinuxagent/common/osutil/factory.py", line 50, in get_osutil
return _get_osutil(distro_name, distro_code_name, distro_version, distro_full_name)
File "/usr/lib/python3/dist-packages/azurelinuxagent/common/osutil/factory.py", line 79, in _get_osutil
return DebianOSBaseUtil()
NameError: name 'DebianOSBaseUtil' is not defined
waagent version: 2
Note: Please add some context which would help us understand the problem better
Distro and WALinuxAgent details (please complete the following information):
Distro and Version: [e.g. Ubuntu 16.04]
PRETTY_NAME="Kali GNU/Linux Rolling"
NAME="Kali GNU/Linux"
ID=kali
VERSION="2020.2"
VERSION_ID="2020.2"
VERSION_CODENAME="kali-rolling"
ID_LIKE=debian
ANSI_COLOR="1;31"
HOME_URL="https://www.kali.org/"
SUPPORT_URL="https://forums.kali.org/"
BUG_REPORT_URL="https://bugs.kali.org/"
WALinuxAgent version [e.g. 2.2.40, you can copy the output of
waagent --version
, more info here ]2.2.47
Additional context
Add any other context about the problem here.
python3 version: Python 3.8.3
systemctl status walinuxagent.service
● walinuxagent.service - Microsft Azure Linux Agent
Loaded: loaded (/lib/systemd/system/walinuxagent.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2020-06-05 22:12:08 EDT; 28min ago
Process: 690 ExecStart=/usr/sbin/waagent -daemon (code=exited, status=1/FAILURE)
Main PID: 690 (code=exited, status=1/FAILURE)
Jun 05 22:12:08 waagent[690]: event_logger = EventLogger()
Jun 05 22:12:08 waagent[690]: File "/usr/lib/python3/dist-packages/azurelinuxagent/common/event.py", line 304, in init
Jun 05 22:12:08 waagent[690]: osutil = get_osutil()
Jun 05 22:12:08 waagent[690]: File "/usr/lib/python3/dist-packages/azurelinuxagent/common/osutil/factory.py", line 50, in get_osutil
Jun 05 22:12:08 waagent[690]: return _get_osutil(distro_name, distro_code_name, distro_version, distro_full_name)
Jun 05 22:12:08 waagent[690]: File "/usr/lib/python3/dist-packages/azurelinuxagent/common/osutil/factory.py", line 79, in _get_osutil
Jun 05 22:12:08 waagent[690]: return DebianOSBaseUtil()
Jun 05 22:12:08 waagent[690]: NameError: name 'DebianOSBaseUtil' is not defined
Jun 05 22:12:08 systemd[1]: walinuxagent.service: Main process exited, code=exited, status=1/FAILURE
Jun 05 22:12:08 systemd[1]: walinuxagent.service: Failed with result 'exit-code'.
Log file attached
If possible, please provide the full /var/log/waagent.log file to help us understand the problem better and get the context of the issue.
The text was updated successfully, but these errors were encountered: