Download & Extend

Cloning site takes over generic alias symlink

Project:Provision
Version:6.x-0.4-alpha3
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Cloning a site will remap the generic alias of the cloned site, making it point to the new site.

If you have a site "example.com", you will also have a generic alias of the form "www.example.com -> example.com". Now, if you clone this site to example.net, the symlink will change and look like "www.example.com -> example.net" (the .com points to the .net).

Basically, this makes the www. alias of the cloned site point to the clone.

Comments

#1

Hmm are you sure this isn't a duplicate of #595494: Cloning a site that has a site alias / alias redirection can hijack the alias to point to the clone (I thought we'd fixed this)

Are you running the latest from HEAD or was this against 6.x-04alpha3?

Cheers!

#2

Status:active» closed (duplicate)

Indeed, it is. Thought I search for a similar issue first, but I looked in provision, not hosting. Sorry for the noise.

#3

Just to make things clear: the issue here is automatic aliases, so I think we should reopen the other issue. I'll go ahead and do that.

#4

Status:closed (duplicate)» fixed

So here's the test I did. I first created test.com, with alias.test.com as a user-defined alias and www.test.com generated automatically by aegir. The result:

sh-3.2$ ls -al
total 32
drwxr-xr-x  8 hostmaster hostmaster 4096 jan 18 18:15 .
drwxr-xr-x 10 hostmaster hostmaster 4096 sep 28 17:45 ..
lrwxrwxrwx  1 hostmaster hostmaster    8 jan 18 18:13 alias.test.com -> test.com
drwxr-xr-x  5 hostmaster hostmaster 4096 sep 25 13:30 all
drwxr-xr-x  2 hostmaster hostmaster 4096 sep 16 15:40 default
drwxr-xr-x  6 hostmaster hostmaster 4096 jan 18 18:15 test.com
lrwxrwxrwx  1 hostmaster hostmaster    8 jan 18 18:13 www.test.com -> test.com

After, I cloned that to test3.com, with no user-defined alias:

drwxr-xr-x  8 hostmaster hostmaster 4096 jan 18 18:15 .
drwxr-xr-x 10 hostmaster hostmaster 4096 sep 28 17:45 ..
lrwxrwxrwx  1 hostmaster hostmaster    8 jan 18 18:13 alias.test.com -> test.com
drwxr-xr-x  5 hostmaster hostmaster 4096 sep 25 13:30 all
drwxr-xr-x  2 hostmaster hostmaster 4096 sep 16 15:40 default
drwxr-xr-x  6 hostmaster hostmaster 4096 jan 18 18:15 test3.com
drwxr-xr-x  6 hostmaster hostmaster 4096 jan 18 18:15 test.com
lrwxrwxrwx  1 hostmaster hostmaster    9 jan 18 18:15 www.test3.com -> test3.com
lrwxrwxrwx  1 hostmaster hostmaster    8 jan 18 18:13 www.test.com -> test.com

The automatic alias seems to be working fine. I take it this was a problem with our local patch over alpha2 that was fixed on HEAD. I'm closing this issue.

#5

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.