worldspawn opened a new issue #21: Unattended installation appears to ignore 
nodename setting
URL: https://github.com/apache/couchdb-pkg/issues/21
 
 
   I am trying to do an unattended installation of couchdb. I have set the node 
name debconf value in my cloud init:
   
   ``` - echo "couchdb couchdb/nodename string couchdb@couchdb-1-2" | 
debconf-set-selections```
   
   and confirmed it was set.
   
   ## Expected Behavior
   The couchdb installation vm.args file will specify the node name 
couchdb@couchdb-1-2
   
   ## Current Behavior
   The couchdb installation vm.args file will specify the node name 
[email protected]
   
   ## Possible Solution
   No idea. I'm deeply out of my element here :)
   
   ## Context
   This issue is my most likely candidate for the reason I am unable to 
configure a cluster based on what I have read.
   
   I'm running the following commands from the coordination node. (i'll throw 
the pwd away)
   
   ```curl -X POST -H "Content-Type: application/json" 
http://127.0.0.1:5984/_cluster_setup -d '{"action": "enable_cluster", 
"bind_address":"0.0.0.0", "username": "admin", "password":"6zlYkUJnDO7S", 
"node_count":"3", "singlenode": false}'
   ssh -t [email protected] "curl -X POST -H \"Content-Type: application/json\" 
http://127.0.0.1:5984/_cluster_setup -d '{\"action\": \"enable_cluster\", 
\"bind_address\":\"0.0.0.0\", \"username\": \"admin\", 
\"password\":\"6zlYkUJnDO7S\", \"node_count\":\"3\", \"singlenode\": false }'"
   ssh -t [email protected] "curl -X POST -H \"Content-Type: application/json\" 
http://127.0.0.1:5984/_cluster_setup -d '{\"action\": \"enable_cluster\", 
\"bind_address\":\"0.0.0.0\", \"username\": \"admin\", 
\"password\":\"6zlYkUJnDO7S\", \"node_count\":\"3\", \"singlenode\": false }'"
   
   curl -X POST -H "Content-Type: application/json" 
http://admin:[email protected]:5984/_cluster_setup -d '{"action": 
"enable_cluster", "bind_address":"0.0.0.0", "username": "admin", 
"password":"6zlYkUJnDO7S", "port": 5984, "node_count": "3", "remote_node": 
"10.0.1.11", "remote_current_user": "admin", "remote_current_password": 
"6zlYkUJnDO7S" }'
   curl -X POST -H "Content-Type: application/json" 
http://admin:[email protected]:5984/_cluster_setup -d '{"action": 
"add_node", "host":"10.0.1.11", "port": 5984, "username": "admin", 
"password":"6zlYkUJnDO7S"}'
   
   curl -X POST -H "Content-Type: application/json" 
http://admin:[email protected]:5984/_cluster_setup -d '{"action": 
"enable_cluster", "bind_address":"0.0.0.0", "username": "admin", 
"password":"6zlYkUJnDO7S", "port": 5984, "node_count": "3", "remote_node": 
"10.0.1.12", "remote_current_user": "admin", "remote_current_password": 
"6zlYkUJnDO7S" }'
   curl -X POST -H "Content-Type: application/json" 
http://admin:[email protected]:5984/_cluster_setup -d '{"action": 
"add_node", "host":"10.0.1.12", "port": 5984, "username": "admin", 
"password":"6zlYkUJnDO7S"}'
   
   curl -X POST -H "Content-Type: application/json" 
http://admin:[email protected]:5984/_cluster_setup -d '{"action": 
"finish_cluster"}'```
   
   At which point if i try and create a database I get a 500 and the database 
is created anyway. The database doesn't appear on the other nodes and the other 
nodes all report themselves as being the only member of their cluster. Which 
appears to be (https://github.com/apache/couchdb/issues/603).
   
   ## Your Environment
   I'm deploying to azure ubunto server vms.
   
   cloud-init
   ```#cloud-config
   apt_update: true
   apt_upgrade: true
   disk_setup:
       /dev/sdc:
            table_type: 'gpt'
            layout: true
            overwrite: false
   fs_setup:
       - label: None
         filesystem: ext4
         device: /dev/sdc1
         partition: 'auto'
   mounts:
   - [/dev/sdc1, /var/lib/couchdb,"auto","defaults,nofail", "0", "0"]
   runcmd:
    - echo "deb https://apache.bintray.com/couchdb-deb xenial main" | tee -a 
/etc/apt/sources.list
    - curl -L https://couchdb.apache.org/repo/bintray-pubkey.asc | apt-key add -
    - apt-get update
   # - COUCHDB_PASSWORD=6zlYkUJnDO7S
    - echo "couchdb couchdb/mode select standalone" | debconf-set-selections
    - echo "couchdb couchdb/mode seen true" | debconf-set-selections
    - echo "couchdb couchdb/nodename string couchdb@couchdb-1-1" | 
debconf-set-selections
    - echo "couchdb couchdb/nodename seen true" | debconf-set-selections
    - echo "couchdb couchdb/cookie string 8bea6c29be97492ba1923a9687c034fc" | 
debconf-set-selections
    - echo "couchdb couchdb/cookie seen true" | debconf-set-selections
    - echo "couchdb couchdb/bindaddress string 0.0.0.0" | debconf-set-selections
    - echo "couchdb couchdb/bindaddress seen true" | debconf-set-selections
    #- echo "couchdb couchdb/adminpass password ${COUCHDB_PASSWORD}" | 
debconf-set-selections
    #- echo "couchdb couchdb/adminpass_again password ${COUCHDB_PASSWORD}" | 
debconf-set-selections
    #- echo "couchdb couchdb/adminpass seen true" | debconf-set-selections
    #- echo "couchdb couchdb/adminpass_again seen true" | debconf-set-selections
    - DEBIAN_FRONTEND=noninteractive apt-get install -y couchdb
   ```
   
   I stopped setting the admin details as it seems to leave me out of sync with 
the cluster setup instructions.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to