From b481bfb90b96c70d5d7c988b111058137b1ca60e Mon Sep 17 00:00:00 2001 From: zsdc Date: Sat, 13 Feb 2021 19:56:29 +0200 Subject: dhclient: T3309: Removed dhclient from datasources After the commit 377d1bbbdd45aad25c36ab15ce15c93a39df4ce9 dhclient should be run by Cloud-init properly even without calls from datasources, if this is necessary. This change solves the problems caused by always active dhclient on eth0 interface when Ec2, GCE, or Azure datasource is used. --- cloudinit/sources/DataSourceAzure.py | 6 ------ 1 file changed, 6 deletions(-) (limited to 'cloudinit/sources/DataSourceAzure.py') diff --git a/cloudinit/sources/DataSourceAzure.py b/cloudinit/sources/DataSourceAzure.py index a06e6e1f..e076d5dc 100644 --- a/cloudinit/sources/DataSourceAzure.py +++ b/cloudinit/sources/DataSourceAzure.py @@ -13,7 +13,6 @@ import os import os.path import re from time import time -from subprocess import call from xml.dom import minidom import xml.etree.ElementTree as ET @@ -269,11 +268,6 @@ class DataSourceAzure(sources.DataSource): dsname = 'Azure' _negotiated = False _metadata_imds = sources.UNSET - process_name = 'dhclient' - - tmpps = os.popen("ps -Af").read() - if process_name not in tmpps[:]: - call(['/sbin/dhclient', DEFAULT_PRIMARY_NIC]) def __init__(self, sys_cfg, distro, paths): sources.DataSource.__init__(self, sys_cfg, distro, paths) -- cgit v1.2.3