It is not a bug, i just tried to change ipv6 address in the service configuration but that gave me some error notifications… mysql prefix already exists… so the ipv6 change is not executed.
I have added aliases through the CLI for that site. And before i tried to add aliases by the service configuration, but that gave me some error notifications too. But with CLI that was just a no brainer for adding aliases.
Is there a ‘easy’ way to change the ipv6 for the sites per cli? I did read docs and searched the forum for ‘ipv6 change’ and other keywords but did not find something helpful for it in the forums.
The docs do state cpcmd examples | ApisCP Docs
But i am not sure how to interpret it for just nbaddrs ipv6 change…
I would need to see the errors generated for both situations, otherwise the issue is too wide open to provide appropriate guidance.
Works for me from the limited information. See below.
cpcmd scope:set dns.ip6-pool '[fe80::215:5dff:fe00:9901]'
EditDomain -c ipinfo6,nbaddrs='[fe80::215:5dff:fe00:9901]' -c ipinfo6,enabled=1 site1
DEBUG : Revalidation forced on `ipinfo6'
DEBUG : Firing svclyr.success
DEBUG : Firing service.success
DEBUG : Running reconfigure on ipinfo,ipaddrs
DEBUG : 0.00001 service.success Opcenter\Service\Validators\Ipinfo6\Enabled enabled
DEBUG : 0.00000 service.success Opcenter\Service\Validators\Ipinfo6\Namebased enabled
DEBUG : Running reconfigure on rampart,whitelist
DEBUG : Running reconfigure on diskquota,enabled
DEBUG : Running reconfigure on diskquota,group
DEBUG : Running reconfigure on mysql,dbaseadmin
DEBUG : Running reconfigure on mysql,dbaseprefix
DEBUG : Running reconfigure on pgsql,dbaseadmin
DEBUG : Running reconfigure on cgroup,enabled
DEBUG : Running reconfigure on apache,jail
DEBUG : Running reconfigure on apache,webserver
DEBUG : 0.00000 service.success Opcenter\Service\Validators\Aliases\Enabled enabled
DEBUG : Running reconfigure on mail,enabled
DEBUG : Running hooks for `test.dev' (user: `test')
DEBUG : 0.00001: Site_Module -> _edit
DEBUG : 0.00001: Billing_Module -> _edit
DEBUG : 0.00042: Dns_Module -> _edit
DEBUG : 0.00002: Ipinfo_Module -> _edit
DEBUG : 0.00002: Mysql_Module -> _edit
DEBUG : 0.00002: Pgsql_Module -> _edit
DEBUG : 0.00001: Cgroup_Module -> _edit
DEBUG : 0.00001: Web_Module -> _edit
DEBUG : 0.00001: Bandwidth_Module -> _edit
DEBUG : 0.00001: Ssl_Module -> _edit
DEBUG : 0.00001: Tomcat_Module -> _edit
DEBUG : 0.00001: User_Module -> _edit
DEBUG : 0.00063: Aliases_Module -> _edit
DEBUG : 0.01206: Auth_Module -> _edit
DEBUG : 0.00002: Ftp_Module -> _edit
DEBUG : 0.00001: Ssh_Module -> _edit
DEBUG : 0.00002: Email_Module -> _edit
DEBUG : 0.00001: Crontab_Module -> _edit
DEBUG : 0.00033: Majordomo_Module -> _edit
DEBUG : 0.00001: Spamfilter_Module -> _edit
DEBUG : 0.00001: Dav_Module -> _edit
DEBUG : 0.00014: Letsencrypt_Module -> _edit
DEBUG : 0.00006: Php_Module -> _edit
DEBUG : 0.00003: Sql_Module -> _edit
DEBUG : 0.00018: Webapp_Module -> _edit
DEBUG : Firing vdedit.success
DEBUG : Firing *.end
DEBUG : Commiting service `siteinfo'
DEBUG : Commiting service `billing'
DEBUG : Commiting service `dns'
DEBUG : Commiting service `ipinfo'
DEBUG : Commiting service `ipinfo6'
DEBUG : Commiting service `metrics'
DEBUG : Commiting service `rampart'
DEBUG : Commiting service `reseller'
DEBUG : Commiting service `diskquota'
DEBUG : Commiting service `files'
DEBUG : Commiting service `mysql'
DEBUG : Commiting service `pgsql'
DEBUG : Commiting service `cgroup'
DEBUG : Commiting service `apache'
DEBUG : Commiting service `bandwidth'
DEBUG : Commiting service `logrotate'
DEBUG : Commiting service `logs'
DEBUG : Commiting service `ssl'
DEBUG : Commiting service `tomcat'
DEBUG : Commiting service `users'
DEBUG : Commiting service `aliases'
DEBUG : Commiting service `auth'
DEBUG : Commiting service `ftp'
DEBUG : Commiting service `ssh'
DEBUG : Commiting service `vacation'
DEBUG : Commiting service `mail'
DEBUG : Commiting service `crontab'
DEBUG : Commiting service `mlist'
DEBUG : Commiting service `spamfilter'
DEBUG : Edited site1, test.dev (SUCCESS) Succeeded
# Verify presence
# cat /home/virtual/site1/info/current/ipinfo6
[DEFAULT]
version=3.2
enabled=1
ipaddrs=[]
nbaddrs=['fe80::215:5dff:fe00:9901']
namebased=1
The Error i got when changing the ipv6 in Nexus Service Configuration for the site:
It does not error the IP address but tells me the database prefix xxx_ is already in use. But mysql service is not selected at all for that site. Indeed the xxx_prefix is used in another site.
I thought that if i just change one detail in the service configuration that it just changes that detail, but it checks all fields in the service configuration, selected or not.
Therefor i tried to find the CLI solution for just the ipv6 change.
I tried the cli but it gives the same error:
EditDomain -c ipinfo6,nbaddrs=‘[2a01:4f8:1c17:xxxx::1]’ -c ipinfo6,enabled=1 site3
Error when changing ipv6 in Nexus and cli
! Action failed
EditDomain command: /usr/local/apnscp/bin/EditDomain --fd=%d --output=json -c ‘auth,tpasswd’=‘xxxxxxxxxxx’ -c ‘dns,key’=‘DEFAULT’ -c ‘ipinfo6,nbaddrs’=’[2a01:4f8:1c17:xxxx::1]’ %s
Util_Process::formatDataCallProc(): EditDomain: ERROR : Opcenter\Account\Edit::installServices(): failed verification on service mysql': Opcenter\Service\Validators\Mysql\Dbaseprefix::valid(): database prefix
xxx_’ already in use
0. Error_Reporter::add_error(“database prefix %s' already in use", [“xxx_”]) [/usr/local/apnscp/lib/log_wrapper.php:72] 1. error("database prefix
%s’ already in use”, “xxx_”)
[/usr/local/apnscp/lib/Opcenter/Service/Validators/Mysql/Dbaseprefix.php:72]
2. Opcenter\Service\Validators\Mysql\Dbaseprefix->valid(“xxx_”)
[/usr/local/apnscp/lib/Opcenter/Service/ConfigurationContext.php:561]
3. Opcenter\Service\ConfigurationContext->check(“dbaseprefix”, “xxx_”)
[/usr/local/apnscp/lib/Opcenter/Service/ConfigurationContext.php:164]
4. Opcenter\Service\ConfigurationContext->preflight()
[/usr/local/apnscp/lib/Opcenter/SiteConfiguration.php:729]
5. Opcenter\SiteConfiguration->verify(“mysql”, Opcenter\Service\ConfigurationContext)
[/usr/local/apnscp/lib/Opcenter/SiteConfiguration.php:648]
6. Opcenter\SiteConfiguration->verifyAll()
[/usr/local/apnscp/lib/Opcenter/Account/Edit.php:120]
7. Opcenter\Account\Edit->installServices()
[/usr/local/apnscp/lib/Opcenter/Account/Edit.php:88]
8. Opcenter\Account\Edit->exec()
[/usr/local/apnscp/bin/EditDomain:119]
1 more message
Admin_Module::edit_site(): Opcenter\Account\Edit::installServices(): failed verification on service mysql': Opcenter\Service\Validators\Mysql\Dbaseprefix::valid(): database prefix
xxx_’ already in use
Double-throw safety switch mechanism is in effect. Set mysql,dbaseprefix=None (or null) to disable database support on the account.
Thanks Mat. I changed the prefix for Mysql without checking the select-box. And then it worked…