Add workaround script for midonet-elk
Change-Id: I69106707276a621dbf0887ecbf4cf0b98d033314
(cherry picked from commit 3fb3d39896)
			
			
This commit is contained in:
		
							
								
								
									
										24
									
								
								files/analytics/install-midonet-elk.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								files/analytics/install-midonet-elk.sh
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,24 @@ | |||||||
|  | #!/bin/bash -eux | ||||||
|  | # | ||||||
|  | # WORKAROUND: | ||||||
|  | # In some cases the package midonet-elk doesn't get installed properly | ||||||
|  | # and some of the packaged files are not placed where they should | ||||||
|  | # (e.g. /etc/logstash/conf.d/midonet.conf) | ||||||
|  |  | ||||||
|  | # Check if MidoNet logstash configuration file is there | ||||||
|  | if [ -f /etc/logstash/conf.d/midonet.conf ]; then | ||||||
|  |   exit 0 | ||||||
|  | fi | ||||||
|  |  | ||||||
|  | # Purge midonet-elk and reinstall it, the hard way | ||||||
|  | rpm -e --justdb --nodeps midonet-elk | ||||||
|  | yumdownloader --destdir /tmp/ midonet-elk | ||||||
|  | yum localinstall /tmp/midonet-elk*.rpm | ||||||
|  | cd / | ||||||
|  | rpm2cpio /tmp/midonet-elk*.rpm | cpio -idmv | ||||||
|  | rm /tmp/midonet-elk*.rpm | ||||||
|  |  | ||||||
|  | # Restart logstash if already running | ||||||
|  | systemctl status logstash.service | grep running > /dev/null && systemctl restart logstash.service || true | ||||||
|  |  | ||||||
|  | exit 0 | ||||||
		Reference in New Issue
	
	Block a user
	 Alejandro Andreu
					Alejandro Andreu