Skip to content

Instantly share code, notes, and snippets.

View jakshi's full-sized avatar

Kostiantyn Lysenko jakshi

View GitHub Profile
2016-07-26 03:05:09 UTC [17875-104] LOG: restored log file "00000001000018DD00000049" from archive
2016-07-26 03:05:09 UTC [17875-105] WARNING: page 55394 of relation base/16401/656290290 is uninitialized
2016-07-26 03:05:09 UTC [17875-106] CONTEXT: xlog redo Heap2/VISIBLE: cutoff xid 25960271
2016-07-26 03:05:09 UTC [17875-107] PANIC: WAL contains references to invalid pages
2016-07-26 03:05:09 UTC [17875-108] CONTEXT: xlog redo Heap2/VISIBLE: cutoff xid 25960271
2016-07-26 03:05:09 UTC [17873-4] LOG: startup process (PID 17875) was terminated by signal 6: Aborted
2016-07-26 03:05:09 UTC [17873-5] LOG: terminating any other active server processes
[INFO ] Running state [service.reload] at time 06:57:12.439945
[INFO ] Executing state module.mod_watch for service.reload
[DEBUG ] Could not LazyLoad module.mod_run_check
[INFO ] Executing command 'service postgresql-9.5 status' in directory '/root'
[DEBUG ] output: * status: started
[DEBUG ] Last command return code: 0
[DEBUG ] LazyLoaded service.reload
[ERROR ] Module function service.reload is not available
[INFO ] Completed state [service.reload] at time 06:57:12.480310 duration_in_ms=40.365
# postgresql reload resource
postgresql_conf_reload:
module.wait:
- name: service.reload
- m_name: {{ pillar['postgresql']['service'] }}
- onlyif:
- service {{ pillar['postgresql']['service'] }} status
in state I have:
top.sls:
base:
'*':
- common
'G@roles:postgresql-slave and G@environment:test':
- match: compound
- database.postgresql-slave

Why?

There is a long standing issue in Ruby where the net/http library by default does not check the validity of an SSL certificate during a TLS handshake. Rather than deal with the underlying problem (a missing certificate authority, a self-signed certificate, etc.) one tends to see bad hacks everywhere. This can lead to problems down the road.

From what I can see the OpenSSL library that Rails Installer delivers has no certificate authorities defined. So, let's go fetch some from the curl website. And since this is for ruby, why don't we download and install the file with a ruby script?

Installation

The Ruby Way! (Fun)