2014-07-24T11:15:52.017292 node-17 ./node-17.domain.tld/puppet-apply.log:2014-07-24T11:15:52.017292+01:00 err: Could not update: Execution of '/usr/
bin/apt-get -q -y -o DPkg::Options::=--force-confold --force-yes install mysql-client=5.5.37-0ubuntu0.12.04.1' returned 100: Reading package lists...
2014-07-24T11:15:52.020081 node-17 ./node-17.domain.tld/puppet-apply.log:2014-07-24T11:15:52.020081+01:00 err: Some packages could not be installed.
This may mean that you have
2014-07-24T11:15:52.020081 node-17 ./node-17.domain.tld/puppet-apply.log:2014-07-24T11:15:52.020081+01:00 err: The following information may help to
resolve the situation:
2014-07-24T11:15:52.020081 node-17 ./node-17.domain.tld/puppet-apply.log:2014-07-24T11:15:52.020081+01:00 err: The following packages have unmet dependencies:
2014-07-24T11:15:52.021260 node-17 ./node-17.domain.tld/puppet-apply.log:2014-07-24T11:15:52.021260+01:00 err: E: Unable to correct problems, you have held broken packages.
2014-07-24T11:15:52.021260 node-17 ./node-17.domain.tld/puppet-apply.log:2014-07-24T11:15:52.021260+01:00 err: mysql-client : Depends: mysql-client-5.5 but it is not going to be installed

Events flow http://pastebin.com/A6jWvdzD shows that something went completely wrong with HAproxy backends, many of them had been marked DOWN, so that was a root cause of "504 Gateway Time-out" as well.