davidski / vulnpryer-aws-orchestration

🎯☁️Automated deployment of a VulnPryer pipline on AWS
http://vulnpryer.net
2 stars 2 forks source link

DataPipeline Failure Notice Triggers Immediately #11

Closed davidski closed 9 years ago

davidski commented 9 years ago

With the current pipeline, when the VulnPryer node goes into the setup state the DataPipeline failure notice is triggered immediately. The control script looks to be running fine and the vulnpryer node itself seems to be setting up okay (still in process at this time). This appears to be a problem with the pipeline logic.

abbyyacat commented 9 years ago

I have done a failed (setup_failed) and successful stack testing and only received a single notification for each testing. Please take note of the following changes I have done to achieve a successful stack (given the latest code including the new changes)

$ diff vulnpryer-stg/Berksfile chef-vulnpryer/Berksfile
6,7c6
< cookbook 'sch-mongodb', github: 'davidski/sch-mongodb'
< cookbook 'sch-base', github: 'davidski/sch-base'
---
> cookbook 'sch-mongodb', github: 'davidski/cookbooks', rel: 'sch-mongodb'
9c8

A probable reason why multiple notifications are sent is when 'Start Date Time' is scheduled behind the present date/time which could result to concurrent pipeline instances (backfilling) explaining the multiple SNS notifications.

davidski commented 9 years ago

@abbyyacat The failure notices are being created as soon as the stack starts to come up (the main VulnPryer node has not failed). I'll check to ensure the policy in this repo matches production (I tweaked this policy a bit yesterday) where the current OpsWorks stack generated by the deploy script works when manually triggered (not use data pipeline).

davidski commented 9 years ago

Here's the contents of our current Berksfile, BTW:

source "https://supermarket.getchef.com"

cookbook 'apt', "~> 2.6.0"
cookbook 'build-essential', "~> 2.1.3"
cookbook 'python', "~> 1.4.6"
cookbook 'mongodb', "= 0.16.1"
cookbook 'sch-base', github: 'davidski/sch-base', branch: 'master'
cookbook 'sch-mongodb', github: 'davidski/sch-mongodb', branch: 'master'
cookbook 'vulnpryer', github: 'davidski/chef-vulnpryer'
cookbook 'git', '~> 4.0.2'
cookbook 'chef-sugar'
cookbook 'cron'
cookbook 'aws'
cookbook 'windows', '~> 1.34.0'
abbyyacat commented 9 years ago

I see. I have to admit I haven't experienced something like this in my staging so far. So just to make sure my understanding is correct:

davidski commented 9 years ago
abbyyacat commented 9 years ago

The SNS notification is configured to be sent by the Data Pipeline service using the On Fail and On Success fields. It is possible that the issue is in the pipeline and we may need to consult with AWS why this is happening. Although I think you already deleted it so not sure how we can proceed.

Is it possible if we start another pipeline again and observe if this recurs? I am also staging this from my end using what is in the repository and so far I haven't experienced this. Apologies if I cannot be of help in this case.

davidski commented 9 years ago

Config change from #12 looks to stop this as well. Glad it was an easy (and silly) error on my part!

davidski commented 9 years ago

As an FYI, we had a legitimate pipeline failure this morning (rubygems was throwing a service error, causing convergence to fail). The process correctly generated a single error via SNS.