Skip to content

Instantly share code, notes, and snippets.

@hesco
hesco / 0100-excerpt-from-jenkins-console-logs
Created July 26, 2020 06:51
I am now deploying my subtheme prior to running `drush cim`. Even so I continue to get these errors. Any ideas why, or at least how it is I can= resolve them?
Import the listed configuration changes? (y/n): y
Drupal\Core\Config\ConfigImporterException: There were errors [error]
validating the config synchronization.
Entities exist of type <em class="placeholder">Shortcut link</em> and
<em class="placeholder">Shortcut set</em> <em
class="placeholder">Default</em>. These entities need to be deleted
before importing.
Configuration <em
class="placeholder">block.block.drupal8_parallax_theme_ijan_account_menu</em>
depends on the <em
@hesco
hesco / 0050-a-view-from-docker-host-of-nfs-container
Last active October 2, 2019 00:59
I am running an nfsv4 service on a docker container on a physical host at .114, exporting ports as described below, and with the intention of exposing this service to any other physical host on the 192.168.51.0/24 network segment. I am trying to sort out why I am unable to make a connection from my client machines.
root@dessalines014:~# docker ps
NAMES IMAGE STATUS PORTS
nfs.yourmessagedelivered.com nfsv4:0.2.0 Up 22 hours 192.168.51.114:111->111/tcp, 192.168.51.114:2049->2049/tcp
root@dessalines014:~# iptables-save | grep 2049
-A INPUT -s 192.168.51.114/32 -p tcp -m multiport --sports 111,2049 -m comment --comment "02049 inbound nfs tcp traffic to YMDs NFS server on private IP" -j ACCEPT
-A INPUT -s 192.168.51.114/32 -p udp -m multiport --sports 111,2049 -m comment --comment "02049 inbound nfs udp traffic to YMDs NFS server on private IP" -j ACCEPT
-A OUTPUT -d 192.168.51.114/32 -p tcp -m multiport --dports 111,2049 -m comment --comment "02049 outbound nfs tcp traffic to YMDs NFS server on private IP" -j ACCEPT
-A OUTPUT -d 192.168.51.114/32 -p udp -m multiport --dports 111,2049 -m comment --comment "02049 outbound nfs udp traffic to YMDs NFS server on private IP" -j ACCEPT
@hesco
hesco / 0100-my-dying-mojo-app
Last active September 19, 2019 11:55
cf_supporters is an application built on the mojolicious framework, being served here by the hynotoad, but consistently failing for reasons I do not understand. Any help appreciated.
Restarting the server on deploy_to_digital_ocean with db tag db_tag not yet implemented for uat environment at port 8009
Result of restarting supporters application is: 0
0
0
jenkins@31a3003-00120:/opt/cf/cf_supporters/uat/cf_supporters_mojo$ Server available at http://127.0.0.1:8009
jenkins@31a3003-00120:/opt/cf/cf_supporters/uat/cf_supporters_mojo$ netstat -anp | grep :80
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
# docker ps | grep registry
registry registry:2.7.0 15 minutes ago ago Restarting (1) 35 seconds ago "/entrypoint.sh /etc…"
@hesco
hesco / 0010-systemctl-status-ceph-mon
Created October 27, 2018 22:00
Is my issue here that $CLUSTER and %i are not being interpolated? Any guidance on how to move forward launching my initial monitor, would be appreciated.
root@dessalines011:~/docker-helper-scripts/lib/docker/ceph# systemctl status ceph-mon@dessalines011.service
● ceph-mon@dessalines011.service - Ceph cluster monitor daemon
Loaded: loaded (/lib/systemd/system/ceph-mon@.service; disabled)
Active: failed (Result: start-limit) since Sat 2018-10-27 01:40:20 EDT; 15h ago
Process: 1581579 ExecStart=/usr/bin/ceph-mon -f --cluster ${CLUSTER} --id %i --setuser ceph --setgroup ceph (code=exited, status=1/FAILURE)
Main PID: 1581579 (code=exited, status=1/FAILURE)
Oct 27 01:40:10 dessalines011 systemd[1]: Unit ceph-mon@dessalines011.service entered failed state.
Oct 27 01:40:20 dessalines011 systemd[1]: ceph-mon@dessalines011.service holdoff time over, scheduling restart.
Oct 27 01:40:20 dessalines011 systemd[1]: Stopping Ceph cluster monitor daemon...
@hesco
hesco / 0010-restart-docker
Last active September 14, 2018 09:37
Just successfully upgraded kernel from 3.16.0-4-amd64 (Debian stock kernel), to 3.18.122 (handbuilt, with no changes to legacy .config), but now docker fails to restart. Why, please, would that be?
root@dessalines011:~/docker-helper-scripts/lib/docker/ceph# service docker start
Job for docker.service failed. See 'systemctl status docker.service' and 'journalctl -xn' for details.
root@dessalines011:~/docker-helper-scripts/lib/docker/ceph# systemctl status docker.service
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled)
Drop-In: /etc/systemd/system/docker.service.d
└─service-overrides.conf
Active: failed (Result: start-limit) since Thu 2018-09-13 15:23:13 EDT; 7s ago
Docs: https://docs.docker.com
@hesco
hesco / gist:261f7a849b48598e635ee9b996b32d07
Created August 6, 2018 16:51
RFC: feature/gh296_play_well_with_firewall for puppetlabs-docker
Two weeks ago I created a new feature request on the puppetlabs-docker module, here:
Make module play well with puppetlabs-firewall
https://github.com/puppetlabs/puppetlabs-docker/issues/296
I now have some preliminary code, here:
https://github.com/hesco/puppetlabs-docker/tree/feature/gh296_play_well_with_firewall
which currently reports that:
"This branch is 16 commits ahead, 8 commits behind puppetlabs:master."
@hesco
hesco / gist:24775f8371f10b70861750a0056b40a8
Created April 9, 2018 05:55
Why is it that it is unable to find os.family? Do I need to upgrade facter or something?
root@myhost:~# puppet agent --test
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: {"message":"Server Error: Data Provider type mismatch: Got String when a hash-like object was expected to access value using 'family' from key 'facts.os.family' on node dessalines013.yourmessagedelivered.com","issue_kind":"RUNTIME_ERROR"}
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
root@myhost:~# facter -p os
{"name"=>"Debian", "family"=>"Debian", "release"=>{"major"=>"8", "minor"=>"10", "full"=>"8.10"}, "lsb"=>{"distcodename"=>"jessie", "distid"=>"Debian", "distdescription"=>"Debian GNU/Linux 8.10 (jessie)", "distrelease"=>"8.10", "majdistrelease"=>"8", "minordistrelease"=>"10"}}
#!/bin/bash
set -x
DOMAIN=$1
if [ "x$DOMAIN" == 'x' ]
then
DOMAIN='pbx6.example.com'
PUBLIC_IP=$my_publicly_routable_ip
ETHWE_IP_CIDR=10.0.1.49/24
IMAGE="pbx:0.1.0"
@hesco
hesco / drupal_perms
Created March 3, 2015 15:22
drupal permissions
adduser www-data drupal
cd $DRUPAL_ROOT
chown -R drupal: .
find . -type d -exec chmod u=rwx,g=rx,o= {} \;
find . -type f -exec chmod u=rw,g=r,o= {} \;