Bug 281256 - sysutils/xe-guest-utilities: Updates to the latest format for xenstore attributes.
Summary: sysutils/xe-guest-utilities: Updates to the latest format for xenstore attrib...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-03 20:56 UTC by Paco Hope
Modified: 2024-09-23 16:45 UTC (History)
3 users (show)

See Also:


Attachments
Patch that will modify xe-update-guest-attrs (6.46 KB, patch)
2024-09-03 20:56 UTC, Paco Hope
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paco Hope 2024-09-03 20:56:06 UTC
Created attachment 253309 [details]
Patch that will modify xe-update-guest-attrs

Hi there,

I use this port a lot and I've discovered a bug in it. The guest agent for FreeBSD (a) only reports IPv4 addresses for VMs and doesn't report IPv6 addresses, (b) uses a format in the xenstore that is not the right way to do things these days. There's a github issue that talks about it (https://github.com/xapi-project/xen-api/issues/5166). Since it's just a shell script, I've got a working fix on my system and I'd like to contribute the patch upward.

xapi has moved toward a format like attr/vif/0/ipv4/0 = 10.1.1.1, whereas the current code creates an attribute like attr/eth0/ip = 10.1.1.1. This patch fixes that. Also, xenstore expects one IP per attribute. The old code would send several space-separated IPs (e.g., attr/eth0/ip = '10.1.1.1 10.1.1.2'). The new code would send one IP per attribute (e.g., attr/vif/0/ipv4/0 = 10.1.1.1, attr/vif/0/ipv4/1 = 10.1.1.2)

The current port is 6.2.0_3. Since this was a significant change, I bumped the version to 6.3.0 and took away PORTREVISION. Happy to do it differently if that isn't how it's supposed to be.

I see that there is no maintainer for this port. I might consider volunteering as maintainer for the port, but let's see if I can contribute a patch successfully first. Long-time listener, first time contributor, so please be gentle. :) 

Paco
Comment 1 Mark Felder freebsd_committer freebsd_triage 2024-09-23 16:20:52 UTC
Sorry this hasn't been handled yet. I was the original creator of this port and haven't touched a Xen environment in several years now so I cannot test this myself, but your feedback and notes seem correct.

I would encourage you to take maintainership of this port which would help expedite getting changes committed in the future.
Comment 2 commit-hook freebsd_committer freebsd_triage 2024-09-23 16:45:17 UTC
A commit in branch main references this bug:

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

commit e172102c8c481b266b7650278bd2147055a942e4
Author:     Mark Felder <feld@FreeBSD.org>
AuthorDate: 2024-09-23 16:44:24 +0000
Commit:     Mark Felder <feld@FreeBSD.org>
CommitDate: 2024-09-23 16:44:24 +0000

    sysutils/xe-guest-utilities: Update to 6.3.0

    This update changes the way IP addresses and interfaces are reported to adhere to the newer XAPI syntax and will now report IPv6 addresses.

    PR:  281256
    Reported by:    freebsd@filter.paco.to

 sysutils/xe-guest-utilities/Makefile               |   3 +-
 .../files/patch-xe-update-guest-attrs              | 150 ++++++++++++++++++++-
 2 files changed, 144 insertions(+), 9 deletions(-)