You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bigtop.apache.org by ktsakalozos <gi...@git.apache.org> on 2016/11/21 14:50:48 UTC

[GitHub] bigtop pull request #162: BIGTOP-2570: ease hadoop charm debugging

Github user ktsakalozos commented on a diff in the pull request:

    https://github.com/apache/bigtop/pull/162#discussion_r88909017
  
    --- Diff: bigtop-packages/src/charm/hadoop/layer-hadoop-resourcemanager/reactive/resourcemanager.py ---
    @@ -131,16 +131,28 @@ def send_nn_spec(namenode):
     @when_not('apache-bigtop-resourcemanager.started')
     def start_resourcemanager(namenode):
         hookenv.status_set('maintenance', 'starting resourcemanager')
    -    # NB: service should be started by install, but this may be handy in case
    -    # we have something that removes the .started state in the future. Also
    -    # note we restart here in case we modify conf between install and now.
    -    host.service_restart('hadoop-yarn-resourcemanager')
    -    host.service_restart('hadoop-mapreduce-historyserver')
    -    for port in get_layer_opts().exposed_ports('resourcemanager'):
    -        hookenv.open_port(port)
    -    set_state('apache-bigtop-resourcemanager.started')
    -    hookenv.application_version_set(get_hadoop_version())
    -    hookenv.status_set('maintenance', 'resourcemanager started')
    +    # NB: service should be started by install, but we want to verify it is
    +    # running before we set the .started state and open ports. We always
    +    # restart here, which may seem heavy-handed. However, restart works
    +    # whether the service is currently started or stopped. It also ensures the
    +    # service is using the most current config.
    +    rm_started = host.service_restart('hadoop-yarn-resourcemanager')
    +    if rm_started:
    +        for port in get_layer_opts().exposed_ports('resourcemanager'):
    +            hookenv.open_port(port)
    +        set_state('apache-bigtop-resourcemanager.started')
    +        hookenv.status_set('maintenance', 'resourcemanager started')
    +        hookenv.application_version_set(get_hadoop_version())
    +    else:
    +        hookenv.log('YARN ResourceManager failed to start')
    +        hookenv.status_set('blocked', 'resourcemanager failed to start')
    +        remove_state('apache-bigtop-resourcemanager.started')
    --- End diff --
    
    I guess this is "just in case"


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---