Chassis / Chassis

📦 Chassis is a virtual server for your WordPress site, built using Vagrant.
http://chassis.io/
GNU Lesser General Public License v3.0
621 stars 84 forks source link

Subdomains Hosts Fail Eventually #521

Closed mikeselander closed 5 years ago

mikeselander commented 6 years ago

I've got subdomains working on a vagrant up, but at some point the hosts mapping stops working. I haven't been able to track down when or why yet, but without fail, the subdomains will stop working after some period of time and use. The main site is still accessible. Also, /etc/chassis-hosts/conf.d/subdomains still has all of my subdomains registered in the file.

Running vagrant reload --provision will fix them for a short period of time, but vagrant provision does not.

  1. What operating system do you use? Mac OSX

  2. What version of Vagrant are you running? vagrant 2.0.3

  3. Are you using VirtualBox or VMWare and which version are you using? Virtualbox 5.2.8

  4. Do you have a custom YAML file? If so, what does it contain?

# Domain names to use for Vagrant
#
# The first name will be used as the machine's name, subsequent names will be
# aliased in your hosts file and in nginx
#
# (When overriding, include vagrant.local if you need it)
hosts:
  - clientname.local

# Should we use multisite?
multisite: subdomains

# Set database values to save the prefix so Chassis doesn't freak out on
# re-provisions after tests.
database:
    name: wordpress
    user: wordpress
    password: vagrantpassword
    prefix: wp_

# Themes
#
# Install a list of themes, and activate the last one of them
themes:
  - my_theme

# Extensions
#
# Install a list of extensions automatically
extensions:
  - Chassis/Tester
  - Chassis/db-backup
  - Chassis/Xdebug

# PHP version
php: 7.2

# Run database saves on vagrant halts
db-backup:
  halt: yes
  suspend: no
  1. Do you have any Chassis extensions installed? If so, what are they?
joemcgill commented 6 years ago

Duplicate of #472?

joemcgill commented 6 years ago

After some investigation, this doesn't seem to be a duplicate of the above since this is happening at the network level and is not a permissions issue inside of WP, itself.

joemcgill commented 6 years ago

I think there is a bug in the service that updates hostnames. Manually logging into the VM and running sudo service chassis-hosts restart will resolve the issue momentarily, but at some point, the hostnames get reset and are no longer available. I haven't been able to trace down whether it's the host machine that is resetting the DNS list or if something on the VM is resetting the hostnames, but it definitely seems to be a timing thing.

In the mean time, manually adding subdomains to the host machine's hosts file is a usable workaround, but it would be nice to figure out the root cause here. Otherwise, subdomains are pretty hard to use out of the box.

joemcgill commented 6 years ago

Thanks for taking a crack at this @BronsonQuick. Unfortunately, #522 doesn't seem to have cracked it. If you have ideas to test or other information I could provide, I'd be happy to.