Giter Site home page Giter Site logo

consul-rpm's People

Contributors

ambakshi avatar arodd avatar dky avatar duritong avatar edgej avatar epleterte avatar grossws avatar ivoronin avatar jasperla avatar koreanbbque avatar lebriquet avatar leeuwenrjj avatar millnert avatar nathanhruby avatar patsevanton avatar pdilung avatar phrawzty avatar rumenvasilev avatar temikus avatar tomhillable avatar tomlanyon avatar tootedom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

consul-rpm's Issues

Duplicate unpack prompt breaks build

Hi,

It looks like there is an issue unpacking the consul zip file.
It tries to unpack the file twice which results in a prompt to overwrite the file:

rpmbuild -ba rpmbuild/SPECS/consul.spec

Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.Y6tjDv

  • umask 022
  • cd /root/rpmbuild/BUILD
  • cd /root/rpmbuild/BUILD
  • rm -rf consul-0.9.2
  • /usr/bin/mkdir -p consul-0.9.2
  • cd consul-0.9.2
  • /usr/bin/unzip -qq /root/rpmbuild/SOURCES/consul_0.9.2_linux_amd64.zip
  • STATUS=0
  • '[' 0 -ne 0 ']'
  • /usr/bin/unzip -qq /root/rpmbuild/SOURCES/consul_0.9.2_linux_amd64.zip
    replace consul? [y]es, [n]o, [A]ll, [N]one, [r]ename:

I experience this both with rpmbuild command as with docker build.
It looks like it will be fixed by removing the '-b 0' from the %prep section but I am not a specfile expert.
Also 0.9.2 is the current latest version

init script for consul-template is broken

prog name
wait check
starting service

sh -x /etc/init.d/consul-template start
+ netstat -nptl
+ grep -q '^tcp.*:8400.*LISTEN \+9873\/consul-template'
+ sleep 1
COMMAND  PID   USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
consul  6403 consul   15u  IPv4  32419      0t0  TCP 127.0.0.1:8400 (LISTEN)

infinite loop

Suggestion: Provide a logrotate file

Since we're logging the output of consul to a file, I think it would be convenient to add a logrotate file to the RPM and automatically add it to /etc/logrotate.d. Thoughts?

Restrict executable permission

Hello,

Thanks for this great repo, cut some time on deploying consul on a number of machines.
Would it be ok for a pull request on having additional parameters for the build process?

As an example, it would help having the possibility to set consul binary file mod to 750 where the servers can be accessed by non sudoers.

Let me know if this change adheres to this repo's guidelines and if a pull request should be created.

Thanks,
Alex.

Wait should be implemented in start/stop functions in RHEL6 init script

Hi,

I've came across a problem that is likely related to startup/shutdown of consul in RHEL 6. Following are the details:

Version:

  • consul version: 0.5.2
  • consul-rpm version: 0.5.2-2.17.el6

Details:

  1. It often takes some time until port 8400 is fired up after consul has been started by daemon function.
  2. It often takes some time until consul shuts down when killed by killproc.

This leads to following errors:

  1. Refusal of connection to agent port 8400 when fired right after the startup.
  2. The service fails to start upon restart action because some ports are still bound.

Steps to reproduce:

  1. Refusal of connection to agent port 8400:

    # service consul start && echo '>>> trying to join after start'; consul join -rpc-addr=127.0.0.1:8400 <ip_addr>; echo '>>> trying to join after 2s sleep'; sleep 2; consul join -rpc-addr=127.0.0.1:8400 <ip_addr>
    Starting consul:                                           [  OK  ]
    >>> trying to join after start
    Error connecting to Consul agent: dial tcp 127.0.0.1:8400: connection refused
    >>> trying to join after 2s sleep
    Successfully joined cluster by contacting 1 nodes.
    
    # service consul start; netstat -nptl | grep '8400.*LISTEN' || echo "no listener on tcp 8400"; sleep 1 && netstat -nptl | grep '8400.*LISTEN'
    Starting consul:                                           [  OK  ]
    no listener on tcp 8400
    tcp        0      0 127.0.0.1:8400              0.0.0.0:*                   LISTEN      21187/consul
    
  2. The service fails to start upon restart action because some ports are still bound.

    # service consul restart; echo '>>> after restart' && netstat -nptl | grep consul; echo '>>> after 2s sleep'; sleep 2; netstat -nptl | grep consul; echo '>>> log output'; grep 'address already in use' /var/log/consul | tail -1; echo -n '>>> consul pid: '; pgrep consul || echo 'N/A'
    Shutting down consul:                                      [  OK  ]
    Starting consul:                                           [  OK  ]
    >>> after restart
    tcp        0      0 <host_ip>:8301              0.0.0.0:*                   LISTEN      22934/consul
    tcp        0      0 127.0.0.1:8400              0.0.0.0:*                   LISTEN      22934/consul
    tcp        0      0 127.0.0.1:8500              0.0.0.0:*                   LISTEN      22934/consul
    tcp        0      0 127.0.0.1:8600              0.0.0.0:*                   LISTEN      22934/consul
    >>> after 2s sleep
    >>> log output
    ==> Error starting agent: Failed to start Consul client: Failed to start lan serf: Failed to start TCP listener. Err: listen tcp <host_ip>:8301: bind: address already in use
    >>> consul pid: N/A
    

Unfortunately I haven't investigated this in RHEL 7, nor I've tried different consul versions yet, however I implemented wait in RHEL 6 init script in PR #25.

@duritong, @tomhillable: Would you please review and eventually merge?

Thanks.

consul.init has the port hardcoded in the Startup

If you change the consul port in the consul.json config the consul.init file will fail to startup because it is hardcoded.

if netstat -nptl | grep -q "^tcp.*:8500.*LISTEN \+${pid}\/${prog}"; then

Cloudflare redirects

Seems that cloudflare's redirects breaks spectool's ability to download the files from dl.bintray.com.

Had to do:

wget https://dl.bintray.com/mitchellh/consul/0.5.0_web_ui.zip -O ~/rpmbuild/SOURCES/0.5.0_web_ui.zip
wget https://dl.bintray.com/mitchellh/consul/0.5.0_linux_amd64.zip -O ~/rpmbuild/SOURCES/0.5.0_linux_amd64.zip

This was on a Centos 6.4 server

Consul not starting

Hi,

I am trying to run this in server mode on centos7 with the following cmd options

CMD_OPTS="agent -server -bootstrap-expect 1 -config-dir=/etc/consul -data-dir=/var/lib/consul

I install the rpm, but the service doesn't start on boot, but will start when i manually start it. On boot, when i look at the status, it indicates it is dead. Have you tried the rpm in server mode?

SELinux policy

Hi,

I've created a SELinux policy module for consul (and vault for that matter). If you are interested to use it in the RPM, I'd be happy to share!

-fuero

No License

Hi,

Any chance of adding a license to the project, just so we know where we stand when using it?

Many Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.