Skip to content

couch-doc-update fails on (first ?) deploy

--- git/bitmask ‹develop› » leap deploy thrips ant
Deploying to these nodes: thrips, ant
Continue? yes
 = checking node
   - [thrips] ok
   - [ant] ok
 = synching configuration files
   - hiera/thrips.yaml -> thrips:/etc/leap/hiera.yaml
   - hiera/ant.yaml -> ant:/etc/leap/hiera.yaml
 = synching puppet manifests
   - /home/varac/dev/projects/leap/git/leap_platform/[bin,puppet] -> thrips:/srv/leap
   - /home/varac/dev/projects/leap/git/leap_platform/[bin,puppet] -> ant:/srv/leap
 = applying puppet
   - [thrips] Could not find dependency Package[shorewall] for Exec[default_ipv4_firewall] at /srv/leap/puppet/modules/site_config/manifests/initial_firewall.pp:63
   - [ant] Could not find dependency Package[shorewall] for Exec[default_ipv6_firewall] at /srv/leap/puppet/modules/site_config/manifests/initial_firewall.pp:63
   - [thrips] notice: Scope(Class[main]): Services for thrips.bitmask.net: couchdb soledad
   - [ant] notice: Scope(Class[main]): Services for ant.bitmask.net: couchdb
   - [thrips] notice: /Stage[main]/Site_sshd::Deploy_authorized_keys/Site_sshd::Authorized_keys[root]/File[/root/.ssh/authorized_keys]/content: content changed '{md5}ccc245a658c0014309fab43e3e39db28' to '{md5}d989a0d8ef00b9c034389b3178875a70'
   - [thrips] notice: /Stage[main]/Soledad::Server/X509::Cert[soledad]/File[/etc/x509/certs/soledad.crt]/content: content changed '{md5}9752b4499619113118e97e76cd013d6f' to '{md5}48882eb3fce8cf934522c90bc7983646'
   - [thrips] notice: /Stage[main]/Site_stunnel::Setup/X509::Cert[leap_couchdb]/File[/etc/x509/certs/leap_couchdb.crt]/content: content changed '{md5}9752b4499619113118e97e76cd013d6f' to '{md5}48882eb3fce8cf934522c90bc7983646'
   - [thrips] notice: /Stage[main]/Soledad::Server/X509::Key[soledad]/File[/etc/x509/keys/soledad.key]/content: content changed '{md5}b8dcfca1b41bdcfe59566a6df68a4822' to '{md5}80912b3d9002456f872d5018d517ba65'
   - [thrips] notice: /Stage[main]/Site_stunnel::Setup/X509::Key[leap_couchdb]/File[/etc/x509/keys/leap_couchdb.key]/content: content changed '{md5}b8dcfca1b41bdcfe59566a6df68a4822' to '{md5}80912b3d9002456f872d5018d517ba65'
   - [thrips] notice: /Stage[main]/Soledad::Server/Service[soledad-server]: Triggered 'refresh' from 2 events
   - [thrips] notice: /Stage[main]/Stunnel::Base/Service[stunnel]: Triggered 'refresh' from 2 events
   - [ant] err: /Stage[main]/Site_couchdb/Couchdb::Create_db[identities]/Couchdb::Document[identities_security]/Exec[couch-doc-update --host 127.0.0.1:5984 --db identities --id _security --data '{ "admins": {"names": [], "roles": [] }, "readers": { "names": [], "roles": ["auth"] } }']/returns: change from notrun to 0 failed: couch-doc-update --host 127.0.0.1:5984 --db identities --id _security --data '{ "admins": {"names": [], "roles": [] }, "readers": { "names": [], "roles": ["auth"] } }' returned 1 instead of one of [0] at /srv/leap/puppet/modules/couchdb/manifests/document.pp:23
   - [ant] err: /Stage[main]/Site_couchdb/Couchdb::Create_db[users]/Couchdb::Document[users_security]/Exec[couch-doc-update --host 127.0.0.1:5984 --db users --id _security --data '{ "admins": {"names": [], "roles": [] }, "readers": { "names": ["webapp"], "roles": [] } }']/returns: change from notrun to 0 failed: couch-doc-update --host 127.0.0.1:5984 --db users --id _security --data '{ "admins": {"names": [], "roles": [] }, "readers": { "names": ["webapp"], "roles": [] } }' returned 1 instead of one of [0] at /srv/leap/puppet/modules/couchdb/manifests/document.pp:23
   - [ant] notice: /Stage[main]/Site_couchdb/Couchdb::Create_db[tokens]/Couchdb::Query[create_db_tokens]/Exec[/usr/bin/curl --netrc-file /etc/couchdb/couchdb.netrc -X PUT 127.0.0.1:5984/tokens --data '{}']: Dependency Exec[couch-doc-update --host 127.0.0.1:5984 --db users --id _security --data '{ "admins": {"names": [], "roles": [] }, "readers": { "names": ["webapp"], "roles": [] } }'] has failures: true
   - [ant] warning: /Stage[main]/Site_couchdb/Couchdb::Create_db[tokens]/Couchdb::Query[create_db_tokens]/Exec[/usr/bin/curl --netrc-file /etc/couchdb/couchdb.netrc -X PUT 127.0.0.1:5984/tokens --data '{}']: Skipping because of failed dependencies
   - [ant] err: /Stage[main]/Site_couchdb/Couchdb::Create_db[tickets]/Couchdb::Document[tickets_security]/Exec[couch-doc-update --host 127.0.0.1:5984 --db tickets --id _security --data '{ "admins": {"names": [], "roles": [] }, "readers": { "names": ["webapp"], "roles": [] } }']/returns: change from notrun to 0 failed: couch-doc-update --host 127.0.0.1:5984 --db tickets --id _security --data '{ "admins": {"names": [], "roles": [] }, "readers": { "names": ["webapp"], "roles": [] } }' returned 1 instead of one of [0] at /srv/leap/puppet/modules/couchdb/manifests/document.pp:23
   - [ant] notice: /Stage[main]/Site_couchdb/Couchdb::Create_db[tokens]/Couchdb::Document[tokens_security]/Exec[couch-doc-update --host 127.0.0.1:5984 --db tokens --id _security --data '{ "admins": {"names": [], "roles": [] }, "readers": { "names": [], "roles": ["auth"] } }']: Dependency Exec[couch-doc-update --host 127.0.0.1:5984 --db users --id _security --data '{ "admins": {"names": [], "roles": [] }, "readers": { "names": ["webapp"], "roles": [] } }'] has failures: true
   - [ant] warning: /Stage[main]/Site_couchdb/Couchdb::Create_db[tokens]/Couchdb::Document[tokens_security]/Exec[couch-doc-update --host 127.0.0.1:5984 --db tokens --id _security --data '{ "admins": {"names": [], "roles": [] }, "readers": { "names": [], "roles": ["auth"] } }']: Skipping because of failed dependencies
   - [ant] notice: /Stage[main]/Site_couchdb/Couchdb::Add_user[webapp]/Couchdb::Update[update_user_webapp]/Exec[couch-doc-update --host 127.0.0.1:5986 --db _users --id org.couchdb.user:webapp --data '{"type": "user", "name": "webapp", "roles": ["auth"], "password_sha": "6512ce7aba1512bf6d97049db2dc07885a31ac68", "salt": "7c109e77a49d2687de5b17acf04493a6"}']: Dependency Exec[couch-doc-update --host 127.0.0.1:5984 --db users --id _security --data '{ "admins": {"names": [], "roles": [] }, "readers": { "names": ["webapp"], "roles": [] } }'] has failures: true
   - [ant] warning: /Stage[main]/Site_couchdb/Couchdb::Add_user[webapp]/Couchdb::Update[update_user_webapp]/Exec[couch-doc-update --host 127.0.0.1:5986 --db _users --id org.couchdb.user:webapp --data '{"type": "user", "name": "webapp", "roles": ["auth"], "password_sha": "6512ce7aba1512bf6d97049db2dc07885a31ac68", "salt": "7c109e77a49d2687de5b17acf04493a6"}']: Skipping because of failed dependencies
   - [ant] notice: /Stage[main]/Site_couchdb/Couchdb::Add_user[soledad]/Couchdb::Update[update_user_soledad]/Exec[couch-doc-update --host 127.0.0.1:5986 --db _users --id org.couchdb.user:soledad --data '{"type": "user", "name": "soledad", "roles": ["auth"], "password_sha": "2d16fcddee4950466e7938412d7928f77ea3d8f5", "salt": "6779ff7b5c5177a1070fc98e8bde7858"}']: Dependency Exec[couch-doc-update --host 127.0.0.1:5984 --db users --id _security --data '{ "admins": {"names": [], "roles": [] }, "readers": { "names": ["webapp"], "roles": [] } }'] has failures: true
   - [ant] warning: /Stage[main]/Site_couchdb/Couchdb::Add_user[soledad]/Couchdb::Update[update_user_soledad]/Exec[couch-doc-update --host 127.0.0.1:5986 --db _users --id org.couchdb.user:soledad --data '{"type": "user", "name": "soledad", "roles": ["auth"], "password_sha": "2d16fcddee4950466e7938412d7928f77ea3d8f5", "salt": "6779ff7b5c5177a1070fc98e8bde7858"}']: Skipping because of failed dependencies
   - [thrips] notice: Finished catalog run in 18.64 seconds
   - [ant] err: /Stage[main]/Site_couchdb/Couchdb::Create_db[sessions]/Couchdb::Document[sessions_security]/Exec[couch-doc-update --host 127.0.0.1:5984 --db sessions --id _security --data '{ "admins": {"names": [], "roles": [] }, "readers": { "names": ["webapp"], "roles": [] } }']/returns: change from notrun to 0 failed: couch-doc-update --host 127.0.0.1:5984 --db sessions --id _security --data '{ "admins": {"names": [], "roles": [] }, "readers": { "names": ["webapp"], "roles": [] } }' returned 1 instead of one of [0] at /srv/leap/puppet/modules/couchdb/manifests/document.pp:23
   - [ant] notice: Finished catalog run in 19.80 seconds
   - [thrips] Puppet apply complete (changes made).
   - [ant] Puppet apply complete (changes and failures).

root@ant:~# curl --netrc-file /etc/couchdb/couchdb.netrc 'http://127.0.0.1:5984/_all_dbs'
["identities","sessions","tickets","tokens","users"]
root@ant:~# curl --netrc-file /etc/couchdb/couchdb.netrc 'http://127.0.0.1:5984/identities/_security'
{}
root@ant:~# couch-doc-update --host 127.0.0.1:5984 --db identities --id _security --data '{ "admins": {"names": [], "roles": [] }, "readers": { "names": [], "roles": ["auth"] } }'
root@ant:~# echo $?
0

second deploy works:

--- git/bitmask ‹develop› » leap deploy thrips ant
Deploying to these nodes: thrips, ant
Continue? yes
 = checking node
   - [thrips] ok
   - [ant] ok
 = synching configuration files
   - hiera/thrips.yaml -> thrips:/etc/leap/hiera.yaml
   - hiera/ant.yaml -> ant:/etc/leap/hiera.yaml
 = synching puppet manifests
   - /home/varac/dev/projects/leap/git/leap_platform/[bin,puppet] -> thrips:/srv/leap
   - /home/varac/dev/projects/leap/git/leap_platform/[bin,puppet] -> ant:/srv/leap
 = applying puppet
   - [thrips] Could not find dependency Package[shorewall] for Exec[default_ipv6_firewall] at /srv/leap/puppet/modules/site_config/manifests/initial_firewall.pp:63
   - [ant] Could not find dependency Package[shorewall] for Exec[default_ipv4_firewall] at /srv/leap/puppet/modules/site_config/manifests/initial_firewall.pp:63
   - [ant] notice: Scope(Class[main]): Services for ant.bitmask.net: couchdb
   - [thrips] notice: Scope(Class[main]): Services for thrips.bitmask.net: couchdb soledad
   - [ant] notice: Finished catalog run in 18.57 seconds
   - [thrips] notice: Finished catalog run in 18.43 seconds
   - [ant] Puppet apply complete (changes made).
   - [thrips] Puppet apply complete (changes made).

(from redmine: created on 2013-09-04, closed on 2013-09-04, relates #3697)