Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751707AbdH1Qsi (ORCPT ); Mon, 28 Aug 2017 12:48:38 -0400 Received: from mail-by2nam01on0090.outbound.protection.outlook.com ([104.47.34.90]:20576 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751610AbdH1Qse (ORCPT ); Mon, 28 Aug 2017 12:48:34 -0400 From: KY Srinivasan To: Haiyang Zhang , Stephen Hemminger , Eduardo Otubo 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+Sg2sqCExznaUONoTHjUfe0jaKZ4W8AgAALRQCAAA2u0A== Date: Mon, 28 Aug 2017 16:48:32 +0000 Message-ID: References: <20170828100121.17321-1-otubo@redhat.com> <20170828081624.16a1e4de@xeon-e3> In-Reply-To: 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: [2001:4898:80e8:5::4c] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR21MB0475;6:+Igw+bXtI4s/zkg7CI90ZnKuivbVrMd7XXOmnVjSYDU3ac6HvnVeSnK0aWFJC3a8dVc49gLWaw9XdzFidB+H2ZQLPm/PvSm/FzPR42xzNZawXtC/A5D5j5Y/+WA64Ddtl9YjR+yZMgD7c93XG74dF5q9ssFNX0i6gHxeJapngGyl0gw5mtygQl9u5UrY0Mg7Ltko83D19OztZm2Egm3X23/W0rDx8MoC5AAgqOBd+43RIzJWDHRc/F9sZwvKKgr6IZwBsJSVVHCtZ3Nh/tkwd9xExSZZbCnq+fGdnWbhZEtVq4sXhl2dVr91gNdPRE+MmVDcgvjxlE437xo8KMMKqw==;5:lSSeJcSovuZb9qvjIvgDcvPF4+josbVTsCdGELcQR2ntps5ywWrai5fJ1w7D+Kt464H7hGJM5VRAHlAcKm1F9tS1hUn8yiFfh2GNX86V0ttnyd3N6COZG+PI3D8rLogjxCCBCLGl0LG9Q2pIP0k2fA==;24:oddw2R8ai4boWdgQtANC0mYZXvpkq6/EB5+8+CwZsYBteFIeLdbDo4Kx0S9k8mi+zfEf0dIfWK38pnw84/HBELJDoWw5inbMlEDfGsTrJWg=;7:wH3Je8o4JnG2/zd3lsI0LyBfi8d6AyPkjTJblQ+K5tWdsv0ukMfzaJK/FbgZh+28qBCTKbjGbQgVttDxRyuTFrxBd8PJB/kB70Amb83t9GHaRWmIkJo15KcfJu258B0wLSD0lyLgV7bR6qi6dkI6t1xzhc+3/ohD8Qm20wvnKVni9wWvazbia8K51KES57Syo3fBOdnEpAdqlafWC72jej8viJECBdjeA7JMAMeMsJk= x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: d29937c4-7715-4941-8d3b-08d4ee349e05 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:DM5PR21MB0475; x-ms-traffictypediagnostic: DM5PR21MB0475: authentication-results: spf=none (sender IP is ) smtp.mailfrom=kys@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:DM5PR21MB0475;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:DM5PR21MB0475; x-forefront-prvs: 0413C9F1ED x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39860400002)(47760400005)(24454002)(189002)(13464003)(199003)(377454003)(229853002)(77096006)(9686003)(8676002)(99286003)(55016002)(54906002)(53546010)(6506006)(6436002)(2421001)(2950100002)(25786009)(305945005)(50986999)(76176999)(33656002)(54356999)(10090500001)(97736004)(105586002)(478600001)(5660300001)(106356001)(10290500003)(101416001)(7696004)(68736007)(86612001)(2561002)(4326008)(86362001)(6116002)(102836003)(81166006)(81156014)(8990500004)(8936002)(2906002)(1511001)(53936002)(14454004)(7736002)(6246003)(189998001)(3660700001)(5005710100001)(3280700002)(74316002)(2900100001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR21MB0475;H:DM5PR21MB0476.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A: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 16:48:32.1550 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR21MB0475 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 v7SGmfPE009586 Content-Length: 2117 Lines: 56 > -----Original Message----- > From: Haiyang Zhang > Sent: Monday, August 28, 2017 8:57 AM > 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 > > > > > -----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. I wrote this script initially to provide an example script for Distros to base their solution on. KVP supports IP injection to enable VM migration. For this scenario, I think we recommend that NM be disabled. K. Y >