Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Couchdb2 clean install #960

Merged
merged 15 commits into from
Oct 5, 2017
Merged

Couchdb2 clean install #960

merged 15 commits into from
Oct 5, 2017

Conversation

dannyroberts
Copy link
Member

we also noticed that lvm role was formatting drives as FAT12, because the last few args were off by one. Cal checked and it seems to be affecting at least ICDS as well.

state: directory
mode: 0755
owner: "{{ couchdb_user }}"
group: "{{ couchdb_group }}"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that i think of it, this might not work because this user & group probably won't be created by this point on a clean install. @emord not sure if we want to move some of this into your ansible-galaxy package

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it matters if the parent_srcs_dir is owned by the couchdb user.

It makes sense to move teh data directory creation to that. I think that stopped working after I made this change andrewrothstein/ansible-couchdb-cluster@826df60

Copy link
Member Author

@dannyroberts dannyroberts Sep 29, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the tip. I'll PR a change to explicitly create that dir to https://github.com/andrewrothstein/ansible-couchdb-cluster then, since it was relying on lazy creation before.

@@ -15,7 +15,7 @@

- name: Create partition on block storage volume
sudo: yes
shell: echo -e "o\nn\np\n1\n\n\nt\n1\n8e\nw" | fdisk {{ item.item }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dannyroberts this worked fine last time I deployed (ctrls) did you use 14.04 to test? fdisk changed this behavior (smarter autoselect partition number) in a commit, this is why our LVM is a bit risky or dangerous, for example it would fail if server language is set to French.

Copy link
Member Author

@dannyroberts dannyroberts Oct 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really? I think @calellowitz and I checked enikshay (ctrls) and saw some FAT12-formatted drives there as well, presumably for the same reason. When you said it worked fine, do you mean it didn't halt mid-way and you did end up with a consolidated drive, or do you mean you're sure they were formatted as Linux (or whatever the target format is)?

For comparison, on the new deploy it didn't fail and I think it would have created the consolidated drive fine, but the disks were all formatted FAT12.

Copy link
Contributor

@javierwilson javierwilson Oct 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i see... yeah, that's what i meant by "it worked", you're right, partitions were created with FAT12 type, but just so we're clear they were all correctly formatted as ext4. as far as I understand, otherwise they just wouldn't work at all.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, interesting. I wasn't making a distinction between those two things. Sounds like this change is still technically an improvement, though, even if it's inconsequential in the scheme of things, right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, absolutely

@@ -1,4 +1,4 @@
ansible==2.2.1
ansible==2.4
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyone see an issue with this? I'm going to run a deploy to the couch machine with this to confirm it doesn't cause any problems.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps some deprecated warnings will become errors now, but i think it's a good to go for it even if it requires extra work to update some playbooks

Copy link
Member Author

@dannyroberts dannyroberts Oct 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, so looks like we can't do this because there's an active bug in the monit module in 2.4 that prevents monit 5.18 and below from working; we're on monit 5.6 and that's the latest available in apt. I opened a PR to fix it here: ansible/ansible#31212

@dannyroberts
Copy link
Member Author

dannyroberts commented Oct 4, 2017

@javierwilson Added a number of changes here, all of this is already deployed.

  • I made a fix to andrewrothstein.ansible-couchdb-cluster, got it merged, and then updated to the new commit
  • Other changes had been made to that that now made it require ansible 2.4
  • So I updated to ansible 2.4
  • Ansible 2.4 had a bug in it that broke monit commands for us, so I fixed that; that's now merged into the devel branch and will be in 2.4.1. when that's released
  • In the meantime, I forked to dimagi/ansible, checked out the 2.4.0 release (v2.4.0.0-1) and cherry-picked my commit onto it, and pinned our ansible version (in this repo) to that.

Would be great to get this merged and behind me!

@dannyroberts dannyroberts merged commit 8940693 into master Oct 5, 2017
@dannyroberts dannyroberts deleted the couchdb2-clean-install branch October 5, 2017 15:14
@@ -1,29 +1,29 @@
---
# Add and configure rabbitmq
- name: Add rabbitmq official apt repository
sudo: true
become: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why become:true here and become:yes elsewhere (no action needed. existed before)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes and true evaluate to the same thing in yaml (== json true), so it doesn't matter which one you use. As to why we don't just pick one... I think we've just never bothered to agree on a repo-wide preference for one or the other.

@@ -21,6 +21,10 @@ active_sites:
riakcs: False
couchdb2: False

couchdb2:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Swiss doesn't have this yet right? also would need the cluster settings I think

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch. I'm not sure whether it makes a difference, but yeah I shouldn't have included this commit in this PR. Reverting here: #968

@@ -0,0 +1,14 @@
- name: Install ndg-httpsclient so we can download couch
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work-around...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants