Closed (fixed)
Project:
Hostmaster (Aegir)
Version:
6.x-1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Aug 2010 at 04:11 UTC
Updated:
30 May 2014 at 10:04 UTC
Jump to comment: Most recent
Comments
Comment #1
realityloop commentedexample error output when trying to create new site with same name:
user warning: Duplicate entry 'sitename.org.au' for key 2 query: INSERT INTO hosting_context (nid, name) VALUES (1355, 'sitename.org.au') in /var/aegir/hostmaster-0.4-alpha9/profiles/hostmaster/modules/hosting/hosting.module on line 745.
Comment #2
SeanBannister commentedSub, just experienced the same issue.
Comment #3
SeanBannister commentedJust in case anyones interested, I just realized that deleting the sites node removes it from hosting_context.
Comment #4
adrian commented[master e4d3309] Fix for #874340 delete context on site delete task.
1 files changed, 6 insertions(+), 3 deletions(-)
there's this fix in head now.
Comment #6
Anonymous (not verified) commentedI just came across this same issue/error when trying to delete a site manually following these instructions: http://community.aegirproject.org/node/26
I didn't delete the site node as that step is 'not recommended'.
Can someone add the appropriate step(s) to the documentation (above) to account for this?
Comment #7
anarcat commentedI am not sure I understand what you are refering to here. You deleted a site manually but didn't remove the site node, why would we remove the hosting_context?
Comment #8
Anonymous (not verified) commentedSorry, I'll try to explain further...
I had a site in Aegir that didn't install properly, it also wouldn't delete properly. I therefore had to delete the site manually by following the 'Manually deleting the site' instructions here: http://community.aegirproject.org/node/26
As per those instructions, I didn't delete the site note itself as that's 'not recommended'.
So that all worked and the site was deleted, but the site node in Aegir remained.
However, I then tried to create a new site with the same domain name (essentially re-installing the same site after I fixed the error that caused the installation to fail the first time). This is when I got the error mentioned in this issue (see #1 above). This was because the site I manually deleted still had an entry in the hosting_context table and so was conflicting with the new site I was trying to create. Manually removing the original site's entry from the hosting_context table allowed me to finally re-install the site successfully.
My recommendation is to add a step to the 'Manually deleting the site' instructions linked above that explains how to delete that entry from the hosting_context table to prevent this issue in future (I'd do it myself but the instructions aren't setup like a wiki entry that I can edit...).
Comment #9
anarcat commentedAaah, I see. Well, this *is* a wiki and you *should* be able to edit it, so go right ahead. :)
Comment #10
Anonymous (not verified) commentedSilly me, didn't realise I had to create an account to edit the page...
Done now, thanks.