[PATCH 1/3] tools/hotplug: Fix hostname setting in vif-nat

Diego Sueiro posted 3 patches 5 years, 5 months ago
Maintainers: Wei Liu <wl@xen.org>, Ian Jackson <ian.jackson@eu.citrix.com>
[PATCH 1/3] tools/hotplug: Fix hostname setting in vif-nat
Posted by Diego Sueiro 5 years, 5 months ago
Setting the hostname is failing because the "$XENBUS_PATH/domain"
doesn't exist anymore. To fix this we set it to dom$domid

Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
---
 tools/hotplug/Linux/vif-nat | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/hotplug/Linux/vif-nat b/tools/hotplug/Linux/vif-nat
index a76d9c7..2614435 100644
--- a/tools/hotplug/Linux/vif-nat
+++ b/tools/hotplug/Linux/vif-nat
@@ -85,7 +85,7 @@ router_ip=$(routing_ip "$ip")
 # Split the given IP/bits pair.
 vif_ip=`echo ${ip} | awk -F/ '{print $1}'`
 
-hostname=$(xenstore_read "$XENBUS_PATH/domain" | tr -- '_.:/+' '-----')
+hostname=dom$domid
 if [ "$vifid" != "1" ]
 then
   hostname="$hostname-$vifid"
-- 
2.7.4


Re: [PATCH 1/3] tools/hotplug: Fix hostname setting in vif-nat
Posted by Bertrand Marquis 5 years, 5 months ago

> On 20 Aug 2020, at 11:58, Diego Sueiro <Diego.Sueiro@arm.com> wrote:
> 
> Setting the hostname is failing because the "$XENBUS_PATH/domain"
> doesn't exist anymore. To fix this we set it to dom$domid
> 
> Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>

> ---
> tools/hotplug/Linux/vif-nat | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/hotplug/Linux/vif-nat b/tools/hotplug/Linux/vif-nat
> index a76d9c7..2614435 100644
> --- a/tools/hotplug/Linux/vif-nat
> +++ b/tools/hotplug/Linux/vif-nat
> @@ -85,7 +85,7 @@ router_ip=$(routing_ip "$ip")
> # Split the given IP/bits pair.
> vif_ip=`echo ${ip} | awk -F/ '{print $1}'`
> 
> -hostname=$(xenstore_read "$XENBUS_PATH/domain" | tr -- '_.:/+' '-----')
> +hostname=dom$domid
> if [ "$vifid" != "1" ]
> then
>   hostname="$hostname-$vifid"
> -- 
> 2.7.4
> 
> 


Re: [PATCH 1/3] tools/hotplug: Fix hostname setting in vif-nat
Posted by Wei Liu 5 years, 5 months ago
On Thu, Aug 27, 2020 at 02:14:03PM +0000, Bertrand Marquis wrote:
> 
> 
> > On 20 Aug 2020, at 11:58, Diego Sueiro <Diego.Sueiro@arm.com> wrote:
> > 
> > Setting the hostname is failing because the "$XENBUS_PATH/domain"
> > doesn't exist anymore. To fix this we set it to dom$domid
> > 
> > Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
> Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
> 

Acked-by: Wei Liu <wl@xen.org>