From 4854cd42c4705e594c8c5fd8334c702a756c71af Mon Sep 17 00:00:00 2001 From: Andrew Butcher Date: Thu, 4 Feb 2016 10:58:50 -0500 Subject: Remove etcd up checks from fluentd_master. --- roles/fluentd_master/tasks/main.yml | 8 -------- 1 file changed, 8 deletions(-) (limited to 'roles') diff --git a/roles/fluentd_master/tasks/main.yml b/roles/fluentd_master/tasks/main.yml index 32f972f0a..8f8a4302d 100644 --- a/roles/fluentd_master/tasks/main.yml +++ b/roles/fluentd_master/tasks/main.yml @@ -42,14 +42,6 @@ owner: 'td-agent' mode: 0444 -- name: wait for etcd to start up - wait_for: port=4001 delay=10 - when: embedded_etcd | bool - -- name: wait for etcd peer to start up - wait_for: port=7001 delay=10 - when: embedded_etcd | bool - - name: ensure td-agent is running service: name: 'td-agent' -- cgit v1.2.3 From 2b3af4a3d009e6eac172db437b1e701ec5004dc9 Mon Sep 17 00:00:00 2001 From: Andrew Butcher Date: Mon, 8 Feb 2016 16:59:08 -0500 Subject: Remove fluentd_master and fluentd_node roles. --- roles/fluentd_master/tasks/main.yml | 49 ------------------- roles/fluentd_master/templates/kubernetes.conf.j2 | 9 ---- roles/fluentd_node/tasks/main.yml | 57 ----------------------- roles/fluentd_node/templates/kubernetes.conf.j2 | 53 --------------------- roles/fluentd_node/templates/td-agent.j2 | 2 - roles/openshift_common/tasks/main.yml | 1 - roles/openshift_facts/library/openshift_facts.py | 18 ------- 7 files changed, 189 deletions(-) delete mode 100644 roles/fluentd_master/tasks/main.yml delete mode 100644 roles/fluentd_master/templates/kubernetes.conf.j2 delete mode 100644 roles/fluentd_node/tasks/main.yml delete mode 100644 roles/fluentd_node/templates/kubernetes.conf.j2 delete mode 100644 roles/fluentd_node/templates/td-agent.j2 (limited to 'roles') diff --git a/roles/fluentd_master/tasks/main.yml b/roles/fluentd_master/tasks/main.yml deleted file mode 100644 index 8f8a4302d..000000000 --- a/roles/fluentd_master/tasks/main.yml +++ /dev/null @@ -1,49 +0,0 @@ ---- -- fail: - msg: "fluentd master is not yet supported on atomic hosts" - when: openshift.common.is_atomic | bool - -# TODO: Update fluentd install and configuration when packaging is complete -- name: download and install td-agent - action: "{{ ansible_pkg_mgr }} name='http://packages.treasuredata.com/2/redhat/7/x86_64/td-agent-2.2.0-0.x86_64.rpm' state=present" - when: not openshift.common.is_atomic | bool - -- name: Verify fluentd plugin installed - command: '/opt/td-agent/embedded/bin/gem query -i fluent-plugin-kubernetes' - register: _fluent_plugin_check - failed_when: false - changed_when: false - -- name: install Kubernetes fluentd plugin - command: '/opt/td-agent/embedded/bin/gem install fluent-plugin-kubernetes' - when: _fluent_plugin_check.rc == 1 - -- name: Creates directories - file: - path: "{{ item }}" - state: directory - group: 'td-agent' - owner: 'td-agent' - mode: 0755 - with_items: ['/etc/td-agent/config.d'] - -- name: Add include to td-agent configuration - lineinfile: - dest: '/etc/td-agent/td-agent.conf' - regexp: '^@include config.d' - line: '@include config.d/*.conf' - state: present - -- name: install Kubernetes fluentd configuration file - template: - src: kubernetes.conf.j2 - dest: /etc/td-agent/config.d/kubernetes.conf - group: 'td-agent' - owner: 'td-agent' - mode: 0444 - -- name: ensure td-agent is running - service: - name: 'td-agent' - state: started - enabled: yes diff --git a/roles/fluentd_master/templates/kubernetes.conf.j2 b/roles/fluentd_master/templates/kubernetes.conf.j2 deleted file mode 100644 index 7b5c86062..000000000 --- a/roles/fluentd_master/templates/kubernetes.conf.j2 +++ /dev/null @@ -1,9 +0,0 @@ - - type file - path /var/log/td-agent/containers.log - time_slice_format %Y%m%d - time_slice_wait 10m - time_format %Y%m%dT%H%M%S%z - compress gzip - utc - diff --git a/roles/fluentd_node/tasks/main.yml b/roles/fluentd_node/tasks/main.yml deleted file mode 100644 index 9fd908687..000000000 --- a/roles/fluentd_node/tasks/main.yml +++ /dev/null @@ -1,57 +0,0 @@ ---- -- fail: - msg: "fluentd node is not yet supported on atomic hosts" - when: openshift.common.is_atomic | bool - -# TODO: Update fluentd install and configuration when packaging is complete -- name: download and install td-agent - action: "{{ ansible_pkg_mgr }} name='http://packages.treasuredata.com/2/redhat/7/x86_64/td-agent-2.2.0-0.x86_64.rpm' state=present" - when: not openshift.common.is_atomic | bool - -- name: Verify fluentd plugin installed - command: '/opt/td-agent/embedded/bin/gem query -i fluent-plugin-kubernetes' - register: _fluent_plugin_check - failed_when: false - changed_when: false - -- name: install Kubernetes fluentd plugin - command: '/opt/td-agent/embedded/bin/gem install fluent-plugin-kubernetes' - when: _fluent_plugin_check.rc == 1 - -- name: Override td-agent configuration file - template: - src: td-agent.j2 - dest: /etc/sysconfig/td-agent - group: 'td-agent' - owner: 'td-agent' - mode: 0444 - -- name: Creates directories - file: - path: "{{ item }}" - state: directory - group: 'td-agent' - owner: 'td-agent' - mode: 0755 - with_items: ['/etc/td-agent/config.d', '/var/log/td-agent/tmp'] - -- name: Add include to td-agent configuration - lineinfile: - dest: '/etc/td-agent/td-agent.conf' - regexp: '^@include config.d' - line: '@include config.d/*.conf' - state: present - -- name: install Kubernetes fluentd configuration file - template: - src: kubernetes.conf.j2 - dest: /etc/td-agent/config.d/kubernetes.conf - group: 'td-agent' - owner: 'td-agent' - mode: 0444 - -- name: ensure td-agent is running - service: - name: 'td-agent' - state: started - enabled: yes diff --git a/roles/fluentd_node/templates/kubernetes.conf.j2 b/roles/fluentd_node/templates/kubernetes.conf.j2 deleted file mode 100644 index 5f1eecb20..000000000 --- a/roles/fluentd_node/templates/kubernetes.conf.j2 +++ /dev/null @@ -1,53 +0,0 @@ - - type tail - path /var/lib/docker/containers/*/*-json.log - pos_file /var/log/td-agent/tmp/fluentd-docker.pos - time_format %Y-%m-%dT%H:%M:%S - tag docker.* - format json - read_from_head true - - - - type kubernetes - container_id ${tag_parts[5]} - tag docker.${name} - - - - type copy - - - type forward - send_timeout 60s - recover_wait 10s - heartbeat_interval 1s - phi_threshold 16 - hard_timeout 60s - log_level trace - require_ack_response true - heartbeat_type tcp - - - name {{groups['oo_first_master'][0]}} - host {{hostvars[groups['oo_first_master'][0]].openshift.common.hostname}} - port 24224 - weight 60 - - - - type file - path /var/log/td-agent/forward-failed - - - - - type file - path /var/log/td-agent/containers.log - time_slice_format %Y%m%d - time_slice_wait 10m - time_format %Y%m%dT%H%M%S%z - compress gzip - utc - - diff --git a/roles/fluentd_node/templates/td-agent.j2 b/roles/fluentd_node/templates/td-agent.j2 deleted file mode 100644 index 7245e11ec..000000000 --- a/roles/fluentd_node/templates/td-agent.j2 +++ /dev/null @@ -1,2 +0,0 @@ -DAEMON_ARGS= -TD_AGENT_ARGS="/usr/sbin/td-agent --log /var/log/td-agent/td-agent.log --use-v1-config" diff --git a/roles/openshift_common/tasks/main.yml b/roles/openshift_common/tasks/main.yml index ff8c3b50f..83af04798 100644 --- a/roles/openshift_common/tasks/main.yml +++ b/roles/openshift_common/tasks/main.yml @@ -29,7 +29,6 @@ use_openshift_sdn: "{{ openshift_use_openshift_sdn | default(None) }}" sdn_network_plugin_name: "{{ os_sdn_network_plugin_name | default(None) }}" deployment_type: "{{ openshift_deployment_type }}" - use_fluentd: "{{ openshift_use_fluentd | default(None) }}" use_flannel: "{{ openshift_use_flannel | default(None) }}" use_nuage: "{{ openshift_use_nuage | default(None) }}" use_manageiq: "{{ openshift_use_manageiq | default(None) }}" diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py index 40e54d706..fc36825e8 100755 --- a/roles/openshift_facts/library/openshift_facts.py +++ b/roles/openshift_facts/library/openshift_facts.py @@ -304,23 +304,6 @@ def normalize_provider_facts(provider, metadata): facts = normalize_openstack_facts(metadata, facts) return facts -def set_fluentd_facts_if_unset(facts): - """ Set fluentd facts if not already present in facts dict - dict: the facts dict updated with the generated fluentd facts if - missing - Args: - facts (dict): existing facts - Returns: - dict: the facts dict updated with the generated fluentd - facts if they were not already present - - """ - if 'common' in facts: - if 'use_fluentd' not in facts['common']: - use_fluentd = False - facts['common']['use_fluentd'] = use_fluentd - return facts - def set_flannel_facts_if_unset(facts): """ Set flannel facts if not already present in facts dict dict: the facts dict updated with the flannel facts if @@ -1143,7 +1126,6 @@ class OpenShiftFacts(object): facts['current_config'] = get_current_config(facts) facts = set_url_facts_if_unset(facts) facts = set_project_cfg_facts_if_unset(facts) - facts = set_fluentd_facts_if_unset(facts) facts = set_flannel_facts_if_unset(facts) facts = set_nuage_facts_if_unset(facts) facts = set_node_schedulability(facts) -- cgit v1.2.3