Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up DHCP failed when setting static ip by cloud-init #3257

Closed
3 tasks done
conghuayu opened this issue Jun 12, 2021 · 4 comments
Closed
3 tasks done

Set up DHCP failed when setting static ip by cloud-init #3257

conghuayu opened this issue Jun 12, 2021 · 4 comments
Assignees
Milestone

Comments

@conghuayu
Copy link

conghuayu commented Jun 12, 2021

Prerequisites

Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

  • I am running the latest version
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed

Issue Details

  • Version of AdGuard Home server:
    • v0.106.3
  • How did you install AdGuard Home:
    • install.sh (with root privilege)

AdGuardHome -v --version output:
https://pastebin.ubuntu.com/p/fwZqBztMY5/

Expected Behavior

set up DHCP server

Actual Behavior

return an errbox "Error: control/dhcp/set_config | enabling dhcp: setting static ip: open /etc/dhcpcd.conf: no such file or directory | 500"

Screenshots

config:

C0EF244D-8A02-4A1C-B3A1-231791B6ACB0

err box:

7B0AF308-ABF4-4CC0-92EE-AFFDC9CBDA25

Details

I use Proxmox VE as virtual environment and run AGH on a Debian 10.9.0 with 2 cores and 1GB ram vm.
Gateway is a router(R6850) and the ip address is 10.0.0.1
According to the document, static ip is needed when using AGH, so I give it a static ip by cloud-init. (in this case which is 10.0.1.3 and the netmask is 22)

But cloud-init configure the ip address by adding a config file to /etc/network/interfaces.d/50-cloud-init
content of 50-cloud-init
rather than directly rewrite the /etc/network/interfaces
content of interfaces

So maybe DHCP process only check the /etc/network/interfaces and find that it is still not static and return the err.
The reason I guess so is that as long as I set up static ip through /etc/network/interfaces just looks like this
content of interfaces (manually setting static ip)
the DHCP function works fine.

And here is the log.

I want to know is this a bug or a feature?
is there a best practice to set up DHCP when using both linux with cloud-init and AGH?

@ainar-g ainar-g self-assigned this Jun 15, 2021
@ainar-g ainar-g added this to the v0.107.0 milestone Jun 15, 2021
adguard pushed a commit that referenced this issue Jun 15, 2021
Updates #3257.

Squashed commit of the following:

commit f3c3359
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Tue Jun 15 19:56:23 2021 +0300

    aghnet: fix docs, names

commit 513ade2
Merge: aa58f1d 9f5a015
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Tue Jun 15 19:43:24 2021 +0300

    Merge branch 'master' into 3257-dhcpdc-conf

commit aa58f1d
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Tue Jun 15 17:18:19 2021 +0300

    aghnet: do not expect dhcpdc.conf to exist
@ainar-g
Copy link
Contributor

ainar-g commented Jun 16, 2021

The main error should be fixed on edge and beta channels. We'll still need to see if we should make some changes wrt /etc/network/interfaces.d/.

@ainar-g
Copy link
Contributor

ainar-g commented Jun 16, 2021

Okay, it seems like we should take source directives into account. We'll see if we'll be able to do that in the v0.107.0 cycle.

@ainar-g ainar-g removed their assignment Jun 28, 2021
adguard pushed a commit that referenced this issue Jun 28, 2021
Merge in DNS/adguard-home from 3257-ifaces-source to master

Updates #3257.

Squashed commit of the following:

commit 0b9b42b
Merge: 530a1a2 e25a532
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Mon Jun 28 16:53:36 2021 +0300

    Merge branch 'master' into 3257-ifaces-source

commit 530a1a2
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Fri Jun 25 19:43:55 2021 +0300

    aghnet: imp code, add docs

commit 58de848
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Fri Jun 25 13:34:43 2021 +0300

    aghnet: sup "source" directive

commit c0901ab
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Thu Jun 24 16:46:03 2021 +0300

    aghos: mv func to aghnet
@EugeneOne1
Copy link
Member

@conghuayu, the latest build in the edge channel provides support for source directives in etc/network/interfaces file. Could you please check, if it works with your configuration?

@EugeneOne1
Copy link
Member

@conghuayu, we'll close the issue for now. Please feel free to reopen it if the problem persists.

heyxkhoa pushed a commit to heyxkhoa/AdGuardHome that referenced this issue Mar 20, 2023
Updates AdguardTeam#3257.

Squashed commit of the following:

commit f3c3359
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Tue Jun 15 19:56:23 2021 +0300

    aghnet: fix docs, names

commit 513ade2
Merge: aa58f1d 9f5a015
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Tue Jun 15 19:43:24 2021 +0300

    Merge branch 'master' into 3257-dhcpdc-conf

commit aa58f1d
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Tue Jun 15 17:18:19 2021 +0300

    aghnet: do not expect dhcpdc.conf to exist
heyxkhoa pushed a commit to heyxkhoa/AdGuardHome that referenced this issue Mar 20, 2023
Merge in DNS/adguard-home from 3257-ifaces-source to master

Updates AdguardTeam#3257.

Squashed commit of the following:

commit 0b9b42b
Merge: 530a1a2 e25a532
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Mon Jun 28 16:53:36 2021 +0300

    Merge branch 'master' into 3257-ifaces-source

commit 530a1a2
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Fri Jun 25 19:43:55 2021 +0300

    aghnet: imp code, add docs

commit 58de848
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Fri Jun 25 13:34:43 2021 +0300

    aghnet: sup "source" directive

commit c0901ab
Author: Eugene Burkov <e.burkov@adguard.com>
Date:   Thu Jun 24 16:46:03 2021 +0300

    aghos: mv func to aghnet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants