cleanup salt more strict

  * finally satisfy salt - add virt-what pkg by default for all.
  * set default log_file: /var/log/salt/(minion|master)
    For some reason salt 2017.7.5+ds-1 ignore default values and stuck after
    restart with
    2018-07-19 20:04:04,811 [salt.log.setup   :1145][ERROR   ][32030] An un-handled exception was caught by salt's global exception handler:
    IOError: [Errno 9] Bad file descriptor
    IOError: [Errno 9] Bad file descriptor

Change-Id: I276e410a86ba8f8ad8f68b110a90408558800d70
diff --git a/common/ubuntu_base.sh b/common/ubuntu_base.sh
index a910154..e8fbc59 100644
--- a/common/ubuntu_base.sh
+++ b/common/ubuntu_base.sh
@@ -41,7 +41,7 @@
 # Pretty tools
 EXTRA_PKGS="${EXTRA_PKGS} byobu htop tmux tree vim-nox mc"
 # Common prerequisites
-EXTRA_PKGS="${EXTRA_PKGS} apt-transport-https libmnl0 python-apt python-m2crypto python-psutil acpid"
+EXTRA_PKGS="${EXTRA_PKGS} apt-transport-https libmnl0 python-apt python-m2crypto python-psutil acpid virt-what"
 apt-get -y install ${EXTRA_PKGS}
 
 # Cleanup old kernels, ensure latest is installed via virtual package
diff --git a/common/ubuntu_cleanup_salt.sh b/common/ubuntu_cleanup_salt.sh
index 4e77783..13420da 100644
--- a/common/ubuntu_cleanup_salt.sh
+++ b/common/ubuntu_cleanup_salt.sh
@@ -2,6 +2,8 @@
 
 apt-get purge salt-formula-* -y
 
+salt-call saltutil.clear_cache || true
+
 echo "removing all previously accepted salt keys"
 salt-key -D -y || true
 
@@ -16,13 +18,16 @@
 
 # stop and disable services, for healthy zerodisk
 # They should be enabled after VCP init
-stop_services="salt-api salt-master salt-minion"
+stop_services="salt-minion salt-master salt-api"
 for s in ${stop_services} ; do
   systemctl stop ${s} || true
 # Enable this, after refactoring salt:control:virtng
 #  systemctl disable ${s} || true
 done
 
+# remove all keys at all
+rm -rf /etc/salt/pki/* || true
+
 # Clear\drop cache's
 sync
 echo 3 > /proc/sys/vm/drop_caches
diff --git a/day01-image/files/root/minion.conf b/day01-image/files/root/minion.conf
index 96d98a1..f602f63 100644
--- a/day01-image/files/root/minion.conf
+++ b/day01-image/files/root/minion.conf
@@ -4,45 +4,6 @@
 
 max_event_size: 100000000
 
-grains:
-  roles:
-  - linux.storage
-  - linux.system
-  - linux.network
-  - telegraf.agent
-  - git.client
-  - git.server
-  - reclass.storage
-  - ntp.client
-  - prometheus.collector
-  - maas.cluster
-  - maas.region
-  - grafana.collector
-  - heka.log_collector
-  - backupninja.client
-  - rsyslog.client
-  - openssh.client
-  - openssh.server
-  - jenkins.client
-  - salt.minion
-  - salt.api
-  - salt.master
-  services:
-  - linux
-  - telegraf
-  - git
-  - reclass
-  - ntp
-  - prometheus
-  - maas
-  - grafana
-  - heka
-  - backupninja
-  - rsyslog
-  - openssh
-  - jenkins
-  - salt
-
 grains_dirs:
 - /var/lib/salt/grains
 
@@ -51,5 +12,6 @@
   grains.items: []
 mine_interval: 60
 
-log_level: info
+log_file: /var/log/salt/master
+log_level_logfile: warning
 state_output: changes
diff --git a/mirror-image/files/root/minion.conf b/mirror-image/files/root/minion.conf
index 24aba72..15345f7 100644
--- a/mirror-image/files/root/minion.conf
+++ b/mirror-image/files/root/minion.conf
@@ -4,37 +4,6 @@
 
 max_event_size: 100000000
 
-grains:
-  roles:
-  - iptables.service
-  - telegraf.agent
-  - heka.log_collector
-  - openssh.server
-  - ntp.client
-  - grafana.collector
-  - nginx.server
-  - prometheus.collector
-  - rsyslog.client
-  - linux.storage
-  - linux.network
-  - linux.system
-  - salt.minion
-  - aptly.publisher
-  - aptly.server
-  services:
-  - iptables
-  - telegraf
-  - heka
-  - openssh
-  - ntp
-  - grafana
-  - nginx
-  - prometheus
-  - rsyslog
-  - linux
-  - salt
-  - aptly
-
 grains_dirs:
 - /var/lib/salt/grains
 
@@ -43,5 +12,7 @@
   grains.items: []
 mine_interval: 60
 
-log_level: info
+log_file: /var/log/salt/minion
+log_level_logfile: warning
+
 state_output: changes