Bug 248651 - sysutils/azure-agent: 2.2.45_2 fails to run: waagent -run-exthandlers' failed with exception: [Errno 2] No such file or directory: 'python3': 'python3'
Summary: sysutils/azure-agent: 2.2.45_2 fails to run: waagent -run-exthandlers' failed...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Li-Wen Hsu
URL: https://lists.freebsd.org/pipermail/f...
Keywords: needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2020-08-14 02:19 UTC by tech-lists
Modified: 2021-05-24 07:26 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (weh)
koobs: merge-quarterly?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tech-lists 2020-08-14 02:19:26 UTC
Hi,

I'm using sysutils/azure-agent on FreeBSD 12.1-p8 on Azure. When it runs, it throws tons of errors to the console. I initially reported it to freebsd-virtualization@ see https://lists.freebsd.org/pipermail/freebsd-virtualization/2020-August/008771.html

I was advised:

"Interesting, looking at the Makefile for sysutils/azure-agent - it seems 
like it should be updating references to /usr/bin/python to the 
appropriate python binary for your system:

  38                          -e "s,#!/usr/bin/env 
python,#!${PYTHON_CMD},g" \
  39                          -e "/command_interpreter/ 
s,/usr/local/bin/python,${PYTHON_CMD}    ," \


I would suggest filing a bug report in bugzilla.  I did install it on my 
local system and the daemon started and found the correct python binary, 
but when stopping it the following error was printed:

$ sudo service waagent onestop
/usr/local/etc/rc.d/waagent: WARNING: $command_interpreter python3.7 != 
/usr/local/bin/python3.7
Stopping waagent.
Waiting for PIDS: 57412.
$

so it looks like there may be an inconsistency somewhere."

so am reporting it here.

Meanwhile I have stopped most of the errors by symlinking the installed binary python3.7 to python3 in /usr/local/bin.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2020-08-14 02:33:54 UTC
^Triage: Is this a regression on a previous port/package version? If so, which previous version?
Comment 2 tech-lists 2020-08-14 03:48:58 UTC
(In reply to Kubilay Kocak from comment #1)

Not a regression per se.

This VM was provisioned via azure marketplace. It was 12.0-RELEASE. As provisioned, it had /usr/bin/python (python27) and waagent installed. The version of that waagent was WALinuxAgent-2.2.34.

These (python27 and waagent) were not installed as ports. They were present at the outset, so I presume they were in the azure marketplace build for 12.0.
Comment 3 tech-lists 2020-08-14 04:00:06 UTC
In order to install and use sysutils/azure-agent, I had to first service stop waagent, then rename all the old waagent files and config, then pkg install sysutils/azure-agent

The pkg was installed from a poudriere that builds every day.
Comment 4 commit-hook freebsd_committer freebsd_triage 2021-05-23 13:39:07 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b185a2b866b8642e2500dd691267694ac388875b

commit b185a2b866b8642e2500dd691267694ac388875b
Author:     Li-Wen Hsu <lwhsu@FreeBSD.org>
AuthorDate: 2021-05-23 13:37:40 +0000
Commit:     Li-Wen Hsu <lwhsu@FreeBSD.org>
CommitDate: 2021-05-23 13:37:40 +0000

    sysutils/azure-agent: Update to 2.2.54.2

    PR:             243046, 248543, 248651
    Approved by:    whu (maintainer, implicitly)

 sysutils/azure-agent/Makefile                      | 10 +++----
 sysutils/azure-agent/distinfo                      |  6 ++---
 ...-azurelinuxagent_daemon_resourcedisk_freebsd.py | 31 ++++++++++++++--------
 .../files/patch-config_freebsd_waagent.conf        | 14 ++++------
 4 files changed, 32 insertions(+), 29 deletions(-)
Comment 5 commit-hook freebsd_committer freebsd_triage 2021-05-24 07:26:21 UTC
A commit in branch 2021Q2 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=039306834f7cbe407bd03d32bc546120ece28a9a

commit 039306834f7cbe407bd03d32bc546120ece28a9a
Author:     Li-Wen Hsu <lwhsu@FreeBSD.org>
AuthorDate: 2021-05-23 13:37:40 +0000
Commit:     Li-Wen Hsu <lwhsu@FreeBSD.org>
CommitDate: 2021-05-24 07:25:11 +0000

    sysutils/azure-agent: Update to 2.2.54.2

    PR:             243046, 248543, 248651
    Approved by:    whu (maintainer, implicitly)

    (cherry picked from commit b185a2b866b8642e2500dd691267694ac388875b)

 sysutils/azure-agent/Makefile                      | 10 +++----
 sysutils/azure-agent/distinfo                      |  6 ++---
 ...-azurelinuxagent_daemon_resourcedisk_freebsd.py | 31 ++++++++++++++--------
 .../files/patch-config_freebsd_waagent.conf        | 14 ++++------
 4 files changed, 32 insertions(+), 29 deletions(-)