SVN incoming edit / delete upon merge

  1. Sometimes when merging in svn, a file has been edited / deleted in both locations. To resolve:
  2. May look something like:
    user@boxname:/opt/repo/deploy$ svn status
    M .
    ? target
    ! C deploy
    > local delete, incoming edit upon merge
    ! C foo.py
    > local delete, incoming delete upon merge
    D xxx.yml
    C bar.py
    > local add, incoming add upon merge
  3. To resolve, execute for each line:
    $ svn resolve --accept working ${filename}
  4. EX:
    $ svn resolve --accept working deploy
    $ svn resolve --accept working foo.py
    $ svn resolve --accept working bar.py

svn: Can’t open file ‘${repo}/db/txn-current-lock’: Permission denied

Trying to do a SVN commit & getting:

user:workspaces user$ svn checkout http://svn.test.com/core
Checked out revision 0.
user@desktop$ cd core
user@desktop$ touch foo
user@desktop$ svn add foo
A         foo
user@desktop$ svn commit -m "test"
svn: Commit failed (details follow):
svn: Can't open file '/opt/cmtools/svn_repos/core/db/txn-current-lock': Permission denied

http://stackoverflow.com/questions/960241/svn-permission-denied
Turns out it’s a selinux error

root@server$ chcon -R -t httpd_sys_content_rw_t /opt/cmtools/svn_repos/core/
user@desktop$ svn commit -m "test"
Adding         foo
Transmitting file data .
Committed revision 1.

xymon client init.d script

#!/sbin/sh
#
case "$1" in
start)
        [ -f /opt/cmtools/xymon/client/runclient.sh ] || exit 0
        su - cmuser  -c "/opt/cmtools/xymon/client/runclient.sh start --hostname=cmssbea10.my.domain"
        ;;
stop)
        su - cmuser -c "/opt/cmtools/xymon/client/runclient.sh stop --hostname=cmssbea10.my.domain"
        ;;
*)
        echo "Usage: $0 { start | stop }"
        exit 1
        ;;
esac
exit 0

Xymon on Solaris 10 containers & see minimum one second step error

Source

You are running Xymon in Solaris 10 containers & see the following logs:

2010-08-27 15:19:30 RRD error updating /opt/csw/xymon/data/rrd/buildbox1/ifstat.mac.rrd from 169.169.169.169: /opt/csw/xymon/data/rrd/cmsys2/ifstat.mac.rrd: illegal attempt to update using time 1282947570 when last update time is 1282947570 (minimum one second step)
2010-08-27 15:19:30 RRD error updating /opt/csw/xymon/data/rrd/buildbox1/ifstat.mac.rrd from 169.169.169.169: /opt/csw/xymon/data/rrd/cmsys2/ifstat.mac.rrd: illegal attempt to update using time 1282947570 when last update time is 1282947570 (minimum one second step)

The problem is Xymon client can send 2 pairs of data at the same timestamp.

Find the line in your xymon file

/usr/bin/kstat -p -s '[or]bytes64'

Change it to:

/usr/bin/kstat -p -s '[or]bytes64' | egrep -v 'wrsmd|mac' | sort

BIND server setup

Note: Our IP range is 192.168.0.0/24
This instruction set is based upon this range. Therefore anywhere you see this number, you may replace with your IP range.

  1. CD into working dir
    user@box:/# cd /etc/bind
  2. Backup the origininal
    ?user@box:/# cp named.conf.local named.conf.local.orig
    ?user@box:/# cp named.conf.options named.conf.options.orig
  3. Create the zone.
    user@box:/etc/bind$ vi named.conf.local
    //
    // Do any local configuration here
    //
    
    // Consider adding the 1918 zones here, if they are not used in your
    // organization
    //include "/etc/bind/zones.rfc1918";
    
    # ZONE DEFINITION
    zone "corp.h8n.com" {
    	type master;
    	file "/etc/bind/zones/corp.h8n.com.db";
    	};
    
    # ZONE DEFINITION FOR REVERSE DNS
    zone "0.168.192.corp.h8n.com" {
    	type master;
    	file "/etc/bind/zones/rev.0.168.192.corp.h8n.com";
    };
  4. Modify the forwarder. Define the DNS(s) to which this DNS will forward requests it can’t process
    user@box:/etc/bind$ vi named.conf.options
    options {
    	directory "/var/cache/bind";
    
    	// If there is a firewall between you and nameservers you want
    	// to talk to, you may need to fix the firewall to allow multiple
    	// ports to talk.  See http://www.kb.cert.org/vuls/id/800113
    
    	// If your ISP provided one or more IP addresses for stable 
    	// nameservers, you probably want to use them as forwarders.  
    	// Uncomment the following block, and insert the addresses replacing 
    	// the all-0's placeholder.
    
    	// forwarders {
    	// 	0.0.0.0;
    	// };
    
       forwarders {
          8.8.8.8;
          4.2.2.1;
          4.2.2.2;
       };
    	auth-nxdomain no;    # conform to RFC1035
    	listen-on-v6 { any; };
    	listen-on { 127.0.0.1; 192.168.0.0/24; };
    };
  5. Add the zone definition files
    root@box:/etc/bind# mkdir zones
    root@box:/etc/bind# cd zones
    root@box:/etc/bind/zones$ vi corp.h8n.com.db
    
    ;
    ; DNS zone for corp.h8n.lan
    ;
    $ORIGIN corp.h8n.com.
    $TTL 1D
    ; any time you make a change to the domain, bump the
    ; "serial" setting below. the format is easy:
    ; YYYYMMDDI, with the I being an iterator in case you
    ; make more than one change during any one day
    corp.h8n.com. IN SOA cmlin01.corp.h8n.com. dnsadmin.corp.h8n.com. (
    20120725;
    28800;
    604800;
    604800;
    86400;
    )
    ; cmlin01.corp.h8n.lan serves this domain as the name server (NS)
    corp.h8n.com. IN NS cmlin01.corp.h8n.com.
    
    ;
    ; Define domain functions with CNAMEs
    ; <cname> CNAME <hostname>
    ;
    jenkins IN CNAME cmlin01
    cacti IN CNAME cmlin01
    dns IN CNAME cmlin01
    ntp IN CNAME cmlin01
    
    ldap IN CNAME cmlin02
    phpmyadmin IN CNAME cmlin02
    xymon IN CNAME cmlin02
    
    nexus IN CNAME cmlin03
    django IN CNAME cmlin03
    cmdb IN CNAME cmlin03
    svn IN CNAME cmlin03
    wiki IN CNAME cmlin03
    
    shareddrive IN CNAME nas
    nfs IN CNAME nas
    ;
    ; Define our hostnames for static IP's
    ;
    printer.corp.h8n.com. IN A 192.168.0.10
    nas.corp.h8n.com. IN A 192.168.0.20
    cmlin01.corp.h8n.com. IN A 192.168.0.26
    cmlin02.corp.h8n.com. IN A 192.168.0.24
    cmwin01.corp.h8n.com. IN A 192.168.0.27
    cmosx01.corp.h8n.com. IN A 192.168.0.29
    cmosx02.corp.h8n.com. IN A 192.168.0.30
    cmosx03.corp.h8n.com. IN A 192.168.0.31
    cmlin03.corp.h8n.com. IN A 192.168.0.32
    cmwin02.corp.h8n.com. IN A 192.168.0.33
    cmosx04.corp.h8n.com. IN A 192.168.0.34
    cmwin03.corp.h8n.com. IN A 192.168.0.36
    cmosx05.corp.h8n.com. IN A 192.168.0.37
    
    ; Just in case someone asks for localhost.corp.h8n.lan
    localhost IN A 127.0.0.1
  6. Reverse Pointers. NOTE: The IP is a reverse of hte range we use.
    Our range is 192.168.0.0/24 so the file is 0.168.192…

    cmuser@cmlin01:/etc/bind/zones$ more rev.0.168.192.corp.h8n.com 
    ;
    ; This is our reverse DNS zone file
    ;
    
    ;$ORIGIN 0.168.192.corp.h8n.com.
    $TTL 1D
    corp.h8n.com. IN SOA cmlin01.corp.h8n.com. dnsadmin.corp.h8n.com. (
                            20120716;
                            28800; 
                            604800;
                            604800;
                            86400; 
    )
    
    ;0.168.192.corp.h8n.com IN NS cmlin02.corp.h8n.com.
    @         IN    NS     cmlin01.
    #26       IN    PTR    corp.h8n.com
    10       IN    PTR    printer.corp.h8n.com.
    20       IN    PTR    nas.corp.h8n.com.
    25       IN    PTR    cmlin02.corp.h8n.com.
    26       IN    PTR    cmlin01.corp.h8n.com.
    27       IN    PTR    cmwin01.corp.h8n.com.
    28       IN    PTR    bethosx.corp.h8n.com.
    29       IN    PTR    cmosx01.corp.h8n.com.
    30       IN    PTR    cmosx02.corp.h8n.com.
    31       IN    PTR    cmosx03.corp.h8n.com.
    32       IN    PTR    cmlin03.corp.h8n.com.
    33	 IN    PTR    cmwin02.corp.h8n.com.
    34       IN    PTR    cmosx04.corp.h8n.com.
    35       IN    PTR    jsandlin-mini.corp.h8n.com.
    36       IN    PTR    cmwin03.corp.h8n.com.
    37	 IN    PTR    cmosx05.corp.h8n.com.