Return-Path: X-Original-To: apmail-incubator-cloudstack-users-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B92EDD38A for ; Thu, 8 Nov 2012 17:34:27 +0000 (UTC) Received: (qmail 53156 invoked by uid 500); 8 Nov 2012 17:34:27 -0000 Delivered-To: apmail-incubator-cloudstack-users-archive@incubator.apache.org Received: (qmail 53120 invoked by uid 500); 8 Nov 2012 17:34:27 -0000 Mailing-List: contact cloudstack-users-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-users@incubator.apache.org Delivered-To: mailing list cloudstack-users@incubator.apache.org Received: (qmail 53108 invoked by uid 99); 8 Nov 2012 17:34:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Nov 2012 17:34:27 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of imusayev@webmd.net designates 216.32.180.188 as permitted sender) Received: from [216.32.180.188] (HELO co1outboundpool.messaging.microsoft.com) (216.32.180.188) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Nov 2012 17:34:20 +0000 Received: from mail140-co1-R.bigfish.com (10.243.78.228) by CO1EHSOBE003.bigfish.com (10.243.66.66) with Microsoft SMTP Server id 14.1.225.23; Thu, 8 Nov 2012 17:33:59 +0000 Received: from mail140-co1 (localhost [127.0.0.1]) by mail140-co1-R.bigfish.com (Postfix) with ESMTP id 5AAF14802DE for ; Thu, 8 Nov 2012 17:33:59 +0000 (UTC) X-Forefront-Antispam-Report: CIP:207.138.251.16;KIP:(null);UIP:(null);IPV:NLI;H:EXFE01L-CRP-03.webmdhealth.net;RD:none;EFVD:NLI X-SpamScore: -6 X-BigFish: VPS-6(zzbb2dI98dI9371I542M1432I4015Izz1de0h1202h1d1ah1d2ahzz8275ch8275bh8275dhz31h2a8h668h839h944hd25hf0ah1220h1288h12a5h12a9h12bdh137ah13b6h1441h14ddh1504h1537h153bh15d0l1155h) Received-SPF: softfail (mail140-co1: transitioning domain of webmd.net does not designate 207.138.251.16 as permitted sender) client-ip=207.138.251.16; envelope-from=imusayev@webmd.net; helo=EXFE01L-CRP-03.webmdhealth.net ;mdhealth.net ; Received: from mail140-co1 (localhost.localdomain [127.0.0.1]) by mail140-co1 (MessageSwitch) id 1352396036577219_32340; Thu, 8 Nov 2012 17:33:56 +0000 (UTC) Received: from CO1EHSMHS001.bigfish.com (unknown [10.243.78.229]) by mail140-co1.bigfish.com (Postfix) with ESMTP id 854A79A01A6 for ; Thu, 8 Nov 2012 17:33:56 +0000 (UTC) Received: from EXFE01L-CRP-03.webmdhealth.net (207.138.251.16) by CO1EHSMHS001.bigfish.com (10.243.66.11) with Microsoft SMTP Server (TLS) id 14.1.225.23; Thu, 8 Nov 2012 17:33:49 +0000 Received: from EXHT01L-CRP-03.webmdhealth.net (10.40.10.164) by EXFE01L-CRP-03.webmdhealth.net (10.46.200.20) with Microsoft SMTP Server (TLS) id 8.3.279.5; Thu, 8 Nov 2012 12:33:48 -0500 Received: from EXMBX01L-CRP-03.webmdhealth.net ([fe80::5dee:f0f2:86fe:c40f]) by exht01l-crp-03.webmdhealth.net ([::1]) with mapi id 14.02.0318.004; Thu, 8 Nov 2012 12:33:47 -0500 From: "Musayev, Ilya" To: "cloudstack-users@incubator.apache.org" Subject: RE: alter resolv.conf nameservers on linux Thread-Topic: alter resolv.conf nameservers on linux Thread-Index: Ac29NXkThzGAZiQ5QcWICHQi0I4SfAAMPQgAAAA1pAAAAJqtAAAAo3eAAACnfYAAAiMsgAAHahyAABBpQlA= Date: Thu, 8 Nov 2012 17:34:11 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.46.41.248] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: webmd.net X-Virus-Checked: Checked by ClamAV on apache.org I guess we can pre-stage our resolv.conf in template and edit /etc/dhclie= nt-enter-hooks Append code: make_resolv_conf(){ : } Save and close the file.=20 Works on RHEL, Debian-like will have something similar.. Push the template into CS - that should avoid dhcp updating resolv.conf We can also do "chattr +i /etc/resolv.conf" to make it immutable - that's m= ore of a brick and mortar approach. It's a work around - not a solution. Regards ilya -----Original Message----- From: Caleb Call [mailto:calebcall@me.com]=20 Sent: Wednesday, November 07, 2012 11:40 PM To: cloudstack-users@incubator.apache.org Subject: Re: alter resolv.conf nameservers on linux Sorry, yes, setting the global parameter does not work. The contents of my= /etc/resolv.conf is: # cat /etc/resolv.conf ; generated by /sbin/dhclient-script search cs1cloud.internal nameserver I can edit it to what I want it to be, restart the instance and it gets cha= nged back to this. This happens across all my zones in all my different Cl= oudstack environments. DNS is configured correctly for them. The reason for my desire to not use my virtual router is two fold. First, = I have found the name resolution (forwarding if you will) through the VR to= be spotty at best. To correct it, I usually have to bounce my VR, it's li= ke it just stops passing traffic. This is happening in both of my Cloudsta= ck environments. Second, running a single nameserver is by no means accept= able in any environment. I wouldn't do it in my dev, test, or stage enviro= nments let alone my production environment. We also specify additional par= ameters in /etc/resolv.conf like timeout and we have to be able to specify = additional search domains. On Nov 7, 2012, at 6:07 PM, Chiradeep Vittal = wrote: > Not sure what you mean by #2. Do you mean that you set the global=20 > configuration flag use.external.dns ? > If so, what is the content of /etc/resolv.conf ? >=20 > Why is the DNS forwarder not working for you? Is your zone dns=20 > configured correctly in CloudStack? >=20 > On 11/7/12 4:06 PM, "Caleb Call" wrote: >=20 >> #2 doesn't work. It still stomps /etc/resolv.conf with what's=20 >> provided by the routervm. >>=20 >> On Nov 7, 2012, at 4:48 PM, Caleb Call wrote: >>=20 >>> Thanks, #2 looks perfect. I'll give that a shot. >>>=20 >>> On Nov 7, 2012, at 4:29 PM, Chiradeep Vittal=20 >>> wrote: >>>=20 >>>> That should not be necessary. The DNS server in the router is a >>>> forwarder: >>>> 1. If the target of the DNS resolve is for a VM it has served DHCP=20 >>>> to, it responds with the entry 2. If not, it forwards it to the=20 >>>> 'zone' dns server. >>>>=20 >>>> Or, you can set use.external.dns to 'true', restart the management=20 >>>> server and restart (from the api/ui) the virtual router. >>>> But if you do, you won't get #1. >>>>=20 >>>> On 11/7/12 3:12 PM, "Alex Huang" wrote: >>>>=20 >>>>> In 4.0, what I would do is this. >>>>>=20 >>>>> - Write a plugin. >>>>> - Listen to vm start events. >>>>> - On router vm start, ssh into the router vm and change the=20 >>>>> resolv.conf >>>>>=20 >>>>> In the next release, Murali have added proper external event=20 >>>>> system then you don't even need to do this via a plugin. >>>>>=20 >>>>> --Alex >>>>>=20 >>>>> -----Original Message----- >>>>> From: Caleb Call [mailto:calebcall@me.com] >>>>> Sent: Wednesday, November 07, 2012 3:06 PM >>>>> To: cloudstack-users@incubator.apache.org >>>>> Subject: Re: alter resolv.conf nameservers on linux >>>>>=20 >>>>> Good question, I've been meaning to ask this same thing and keep=20 >>>>> forgetting to. I think I've read that you have to edit the config=20 >>>>> on the router vm, but that doesn't persist a reboot of the router=20 >>>>> vm. Is there a better way to do this? >>>>>=20 >>>>>=20 >>>>> On Nov 7, 2012, at 3:18 PM, "Musayev, Ilya" >>>>> wrote: >>>>>=20 >>>>>> How would I pass on my nameservers in resolv.conf of an instance,=20 >>>>>> instead of router vms IP? >>>>>>=20 >>>>>> As of now, my nameserver is set to ip address of router vm. >>>>>>=20 >>>>>>=20 >>>>>> Thanks >>>>>> ilya >>>>>=20 >>>>=20 >>>=20 >>=20 >=20