some op record

salt

pip install psutil -i http://apt.2980.com/pypi/simple –trusted-host apt.2980.com

salt-run jobs.active

salt '10.17.65.229' cmd.run "python /tmp/test.py" –async

salt "10.17.65.229" saltutil.kill_job 20171127165031008707

sudo salt '*' grains.item saltpath username os

saltutil.sync_modules refresh

sudo salt-run jobs.list_job 'jobid'

kill salt progress and restsart in front

launchctl unload /Library/LaunchDaemons/com.saltstack.salt.minion.plist

salt-minion

maybe the salt should run in front while meeting some error

rsync pay attention the rsync.pas auth 644

check last update node info by salt in 86 cdn manager:

sudo salt -N cdn_node_all cmd.run "grep -o '/raid/wwwroot/Q7/win/enginepatch' /opt/cdnsynctool/CDNSyncTool/common/ComDef.py"


check salt start user auth, and launchctl unload and restart

powershell about

svn st | select-string -pattern "^C"

svn revert -R .\image

About Windows

msys2: 

MSYS2 is a software distro and building platform for Windows.
At its core is an independent rewrite of MSYS, 
based on modern Cygwin (POSIX compatibility layer) and 
MinGW-w64 with the aim of better interoperability with native Windows software. 
It provides a bash shell, Autotools, 
revision control systems and the like for building native Windows applications 
using MinGW-w64 toolchains.
It features a package management system to 
provide easy installation of packages, Pacman. 
It brings many powerful features such as dependency resolution 
and simple complete system upgrades, as well as straight-forward package building.

Reference from: MSYS2 installer

This is the download link in TUNA: Index of /msys2/distrib/x86_64/

DHCP failover configure

Reference from: Linux ISC DHCP Server failover under Debian

primary conf:

option domain-name "ggsre.com";
option domain-name-servers 10.160.16.33,10.160.16.34;
ddns-update-style none;
authoritative;
ping-check true;
default-lease-time 86400;
max-lease-time 172800;
log-facility local7;
failover peer "dhcp-failover" {
    primary;
    address 10.160.16.58;
    port 647;
    peer address 10.160.16.59;
    peer port 847;
    max-response-delay 60;
    max-unacked-updates 10;
    load balance max seconds 3;
    mclt 3600;
    split 128;
}
subnet 10.160.72.0 netmask 255.255.252.0 {
    option routers 10.160.72.1;
    pool {
        failover peer "dhcp-failover";
        range 10.160.72.100 10.160.72.250;
    }
    pool {
        failover peer "dhcp-failover";
        range 10.160.73.1 10.160.73.250;
    }
}
subnet 10.160.16.0 netmask 255.255.254.0 {
        option routers 10.160.16.1;
        option domain-name "outnet.com";
        option domain-name-servers 10.160.16.1;
        next-server 10.160.16.2;
        filename "pxelinux.0";
        default-lease-time 600;
    pool {
        failover peer "dhcp-failover";
        range 10.160.16.5 10.160.16.9;
    }
}

secondary.conf:

option domain-name "ggsre.com";
option domain-name-servers 10.160.16.33,10.160.16.34;
ddns-update-style none;
authoritative;
ping-check true;
default-lease-time 86400;
max-lease-time 172800;
log-facility local7;
failover peer "dhcp-failover" {
    secondary;
    address 10.160.16.59;
    port 847;
    peer address 10.160.16.58;
    peer port 647;
    max-response-delay 60;
    max-unacked-updates 10;
    load balance max seconds 3;
    #mclt 3600;
    #split 128;
}
subnet 10.160.72.0 netmask 255.255.252.0 {
    option routers 10.160.72.1;
    pool {
        failover peer "dhcp-failover";
        range 10.160.72.100 10.160.72.250;
    }
    pool {
        failover peer "dhcp-failover";
        range 10.160.73.1 10.160.73.250;
    }
}
subnet 10.160.16.0 netmask 255.255.254.0 {
        option routers 10.160.16.1;
        option domain-name "outnet.com";
        option domain-name-servers 10.160.16.1;
        next-server 10.160.16.2;
        filename "pxelinux.0";
        default-lease-time 600;
    pool {
        failover peer "dhcp-failover";
        range 10.160.16.5 10.160.16.9;
    }
}

The same conf you could use the `include /the/same/conf` command  import that.

The defferent:

diff dhcpd.*
10,14c10,14
<     primary;
<     address 10.160.16.58;
<     port 647;
<     peer address 10.160.16.59;
<     peer port 847;
---
>     secondary;
>     address 10.160.16.59;
>     port 847;
>     peer address 10.160.16.58;
>     peer port 647;
18,19c18,19
<     mclt 3600;
<     split 128;
---
>     #mclt 3600;
>     #split 128;

See more in dhcp.conf offical website DHCP ISC FAILOVER

Ubuntu 16.04 can’t connect the internet by using 802.1x security

Case 1, because of the UI bug in Ubuntu 16.04, you should edit the connection file "/etc/NetworkManager/system-connections/name-of-your-connection" enter your password value in [802-1x] block like this:

[802-1x]
altsubject-matches=
eap=peap;
identity=account
password=password
phase2-altsubject-matches=
phase2-auth=mschapv2

Case 2, because of the USB which is a bootstrap Ubuntu system was inserted in the usb interface, after me reboot the Ubuntu system, the connection always fail. After remove the USB driver, it will work.