Revision cc6cc460

View differences:

include/FedReplicaManager.h
146 146
        return frm_thread;
147 147
    };
148 148

  
149
    /**
150
     *  Return the last index of the fed log
151
     */
152
    int get_last_index() const
153
    {
154
        return last_index;
155
    }
156

  
149 157
private:
150 158
    friend void * frm_loop(void *arg);
151 159

  
src/cli/one_helper/onezone_helper.rb
147 147
                     when "3" then "leader"
148 148
                     else "-"
149 149
                 end
150
                s["TERM"]     = xml_doc.root.at_xpath("TERM").text
150
                s["TERM"]      = xml_doc.root.at_xpath("TERM").text
151 151
                s["VOTEDFOR"]  = xml_doc.root.at_xpath("VOTEDFOR").text
152 152
                s["COMMIT"]    = xml_doc.root.at_xpath("COMMIT").text
153
                s["LOG_INDEX"] = xml_doc.root.at_xpath("LOG_INDEX").text
153

  
154
                s["LOG_INDEX"]    = xml_doc.root.at_xpath("LOG_INDEX").text
155
                s["FEDLOG_INDEX"] = xml_doc.root.at_xpath("FEDLOG_INDEX").text
154 156
            }
155 157

  
156 158
            puts
157
            CLIHelper.print_header(str_h1 % "SERVERS",false)
159
            CLIHelper.print_header(str_h1 % "ZONE SERVERS",false)
160

  
161
            CLIHelper::ShowTable.new(nil, self) do
162

  
163
                column :"ID", "", :size=>2 do |d|
164
                    d["ID"] if !d.nil?
165
                end
166

  
167
                column :"NAME", "", :left, :size=>15 do |d|
168
                    d["NAME"] if !d.nil?
169
                end
170

  
171
                column :"ENDPOINT", "", :left, :size=>63 do |d|
172
                    d["ENDPOINT"] if !d.nil?
173
                end
174
            end.show([zone_hash['ZONE']['SERVER_POOL']['SERVER']].flatten, {})
175

  
176
            puts
177
            CLIHelper.print_header(str_h1 % "RAFT & FEDERATION SYNC STATUS",false)
158 178

  
159 179
            CLIHelper::ShowTable.new(nil, self) do
160 180

  
......
186 206
                    d["VOTEDFOR"] if !d.nil?
187 207
                end
188 208

  
189
                column :"ENDPOINT", "", :left, :size=>18 do |d|
190
                    d["ENDPOINT"] if !d.nil?
209
                column :"FED_INDEX", "", :left, :size=>10 do |d|
210
                    d["FEDLOG_INDEX"] if !d.nil?
191 211
                end
212

  
192 213
            end.show([zone_hash['ZONE']['SERVER_POOL']['SERVER']].flatten, {})
193 214
        end
194 215

  
src/host/HostPool.cc
361 361

  
362 362
void HostPool::delete_host_vm(int oid)
363 363
{
364
    HostVM * hvm;
365

  
366 364
    map<int, HostVM *>::iterator it = host_vms.find(oid);
367 365

  
368 366
    if ( it != host_vms.end() )
src/raft/RaftManager.cc
1176 1176
    Nebula& nd    = Nebula::instance();
1177 1177
    LogDB * logdb = nd.get_logdb();
1178 1178

  
1179
    FedReplicaManager * frm = nd.get_frm();
1180

  
1179 1181
    unsigned int lindex, lterm;
1180 1182

  
1181 1183
    std::ostringstream oss;
......
1202 1204
            << "<LOG_TERM>"  << lterm  << "</LOG_TERM>";
1203 1205
    }
1204 1206

  
1207
    if ( nd.is_federation_enabled() )
1208
    {
1209
        oss << "<FEDLOG_INDEX>" << frm->get_last_index() << "</FEDLOG_INDEX>";
1210
    }
1211
    else
1212
    {
1213
        oss << "<FEDLOG_INDEX>-1</FEDLOG_INDEX>";
1214
    }
1215

  
1205 1216
    oss << "</RAFT>";
1206 1217

  
1207 1218
	pthread_mutex_unlock(&mutex);

Also available in: Unified diff