Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751550AbdH1P4s (ORCPT ); Mon, 28 Aug 2017 11:56:48 -0400 Received: from mail-cys01nam02on0121.outbound.protection.outlook.com ([104.47.37.121]:6513 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751184AbdH1P4r (ORCPT ); Mon, 28 Aug 2017 11:56:47 -0400 From: Haiyang Zhang To: Stephen Hemminger , Eduardo Otubo , KY Srinivasan CC: "linux-kernel@vger.kernel.org" , "devel@linuxdriverproject.org" , "Stephen Hemminger" , David Miller Subject: RE: [PATCHv2] hv_set_ifconfig.sh double check before setting ip Thread-Topic: [PATCHv2] hv_set_ifconfig.sh double check before setting ip Thread-Index: AQHTH+Sg1FvK7L+VjEaJGZ0Ob7rSUqKZ4W8AgAAKPbA= Date: Mon, 28 Aug 2017 15:56:44 +0000 Message-ID: References: <20170828100121.17321-1-otubo@redhat.com> <20170828081624.16a1e4de@xeon-e3> In-Reply-To: <20170828081624.16a1e4de@xeon-e3> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Ref=https://api.informationprotection.azure.com/api/72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Owner=haiyangz@microsoft.com; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2017-08-28T11:56:42.9103932-04:00; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=General; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Application=Microsoft Azure Information Protection; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Extended_MSFT_Method=Automatic; Sensitivity=General x-originating-ip: [69.128.199.77] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;MWHPR21MB0477;6:O/X8rxx392TZr4kw5VhYdRvP9gANmsLr99/RqMrZmG43DTmyhrTreQwY2POP/6sp70KUq9qQD48QZQPL+6NBbeRDTvpJs2ieIOtaAZ06DHneYf3miKHVEQEdVwz3HUAOpufJUfU3fHTdTIO5MHozcSA0rltQmkyxOuJPTOnbHrMvyGq/HIW4C9GuUmonCzu99ulEe9PRFVKYODHvgKHM2/xxz9NKA0OyneXzTl498et0xBqXpZopSoBWUEhB5uXbKm8gNpFsC6vVFOY0vgKQNLgICRz1JUWEpYO3tftJfrRryn4QyAqHyF8LgExewQ6wc59NRMl5q1sbVRb9xOOk/Q==;5:U38nLmnlvaz48miEPBMUHgOAw3tBe1UAw2gznxRSbddPdbO3KY4E9XUJ+lU70V7IpKfguAXDUXQ/uagrutUXDb8JeMAvuZp519KyrgoI9fSg3HSMBCcxMVBq7BErJOem/ckIXELjSxzkJ6chw6zmqg==;24:9Ohkix1v8t8i6ZI8VhdfiaVKobsH3YxBLfassfa0ci/FtHbTITLRQJ6zwaWF02UPnby2j5qNVLy+3wgkHLxQZ3NMHNwonf5on2p+eiREe8s=;7:Up/2oN4UyGdamL40+VFYtueIOyPvMwhDkDqwpm7dW6uT3PzGxhZWvmx3lBXRMcuvcQCreWaf+AO8CL0csJ8M6eep4TFPCJhxVUkxoY4ilqqfi1BR25E8kJLlqeV9LGH88eZX/2jhe2zqd2Y+li/PcevmQnfeO76BO/XMhI/nhyw7PEb5WzFhsbZq4KE6aJxqEz3wpa2xrlgE+VNLZIlo37Hzq1w4yGUFpg/VyirSlsk= x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: c603ee6d-cf79-4508-62a4-08d4ee2d61d5 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:MWHPR21MB0477; x-ms-traffictypediagnostic: MWHPR21MB0477: authentication-results: spf=none (sender IP is ) smtp.mailfrom=haiyangz@microsoft.com; x-exchange-antispam-report-test: UriScan:(89211679590171)(9452136761055); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(61425038)(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(3002001)(6055026)(61426038)(61427038)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123555025)(20161123558100)(20161123564025)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:MWHPR21MB0477;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:MWHPR21MB0477; x-forefront-prvs: 0413C9F1ED x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39860400002)(47760400005)(377454003)(13464003)(24454002)(199003)(189002)(189998001)(66066001)(53936002)(25786009)(10290500003)(99286003)(54906002)(9686003)(229853002)(55016002)(6246003)(478600001)(1511001)(10090500001)(305945005)(8936002)(14454004)(33656002)(8676002)(4326008)(6436002)(81166006)(81156014)(97736004)(53546010)(102836003)(8990500004)(6116002)(86362001)(3846002)(105586002)(2421001)(68736007)(5660300001)(86612001)(7696004)(7736002)(74316002)(3660700001)(6636002)(2950100002)(77096006)(6506006)(2906002)(3280700002)(2900100001)(101416001)(5005710100001)(106356001)(76176999)(2561002)(54356999)(50986999);DIR:OUT;SFP:1102;SCL:1;SRVR:MWHPR21MB0477;H:MWHPR21MB0479.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Aug 2017 15:56:44.7145 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR21MB0477 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by nfs id v7SFurGG005946 Content-Length: 1388 Lines: 38 > -----Original Message----- > From: Stephen Hemminger [mailto:stephen@networkplumber.org] > Sent: Monday, August 28, 2017 11:16 AM > To: Eduardo Otubo > Cc: linux-kernel@vger.kernel.org; devel@linuxdriverproject.org; Haiyang > Zhang ; Stephen Hemminger > ; David Miller > Subject: Re: [PATCHv2] hv_set_ifconfig.sh double check before setting ip > > On Mon, 28 Aug 2017 12:01:21 +0200 > Eduardo Otubo wrote: > > > v2: The script is now a little bit safer so it doesn't conflicts with > > network daemon trying to set configurations at the same time. > > > > This patch fixes the behavior of the hv_set_ifconfig script when > setting > > the interface ip. Sometimes the interface has already been configured > by > > network daemon, in this case hv_set_ifconfig causes "RTNETLINK: file > > exists error"; in order to avoid this error this patch makes sure > double > > checks the interface before trying anything. > > > > Signed-off-by: Eduardo Otubo > > Adding new dependency on systemd is not going to make this script > even less useful. I wonder why the script still exists at all? Most of > the > Linux distro's can already setup HV networking without it. > This script is used by a host to inject IP into guests. KY knows more details about it.